Need some PHP related help for creating an Addon for Cockpit 2.0.1

Hey there :slight_smile:

First things first: I’m by far not an expert when it comes to PHP. I’m very experienced with JS and NodeJS, but I’ve always tried to avoid PHP as far as possible.

Introduction

Because of the super exciting release of the new Cockpit version I finally decided to develop an Addon I’ve been wanting to do for so long …
Unfortunately I can’t figure out how to create an Addon for Cockpit in the latest version, and I’m looking for someone who’s kind enough to help me out a bit.

In the past there has been a super simple Template, but this doesn’t seem to be working anymore (which is fair enough considering that the last commit was 4 years ago).

What I need

  • An Addon which can be accessed from the sidebar (somewhere at kiss-navlist) which will link to a dashboard
  • A custom API endpoint which I can POST, and also GET, some JSON data to/from
    (always the same structure). There will will be just one data model in total.

I think what I need can be achieved pretty easily. I just can’t fully understand the Addon structure when trying to reverse-engeneer the new Addons which come with the Pro version of Cockpit.

Any help would be super appreciated :pray:´

Thanks in advance and have a nice day.

:information_source: Little addition to what I wrote earlier.

When I copy the old Addon Template to my Cockpit Addons, I can see that the Addon get’s loaded when taking a look in the System Settings:

But I cant’ use, or click on, the plugin anywhere. Neither in the sidebar nor in the Settings.

1 Like

I’d love to help however a new dashboard requires PHP 8+ :laughing: , I still have problems to upgrade my PHP version :laughing: