Custom dropdown menu

Does anyone know if it’s possible to create a custom dropdown menu and place it on every icingadb page next to the existing dropdown and the refresh button?"

I don’t think there’s a icingadb hook available that would allow this.

Or is there another way to do this?

I would like to place a similar menu with custom items next to it.

Hi! You need to create your own Icinga Web Module for this. I looked a bit around the code and found this: icingaweb2/library/Icinga/Web/Widget/Tabextension/Tabextension.php at 9b639285732ffd4de48ac488e13981eb83d9129b · Icinga/icingaweb2 · GitHub

I am not a Developer, so i cant really help you with the Implementation of this - but maybe it gives you an idea. I also know of a few Icinga Web Module Developers here in the Community :wink:
Also, the Youtube Series by my Colleague Markus is a great start: https://www.youtube.com/watch?v=Al4e4bkumsY&list=PLVDjq9pYkysDUk0imvEGDg5TpybsLHiUh&index=3

1 Like

the problem is that the Tabextension is not a hook.

You would provide this with $this->getTabs()->extend(new YourTabExtension()).

and needs to be called in the Controller.

So one option for me would be override the route and redirect the action to my controller which inherits the DowntimesController and here can call the getTabs() and add my extension.

here is an example how it can be done in the monitoring module:

or:

since all controller inherit from:

you could add your code directly here inherit the init() → call the parent::init() and do the tabs stuff here.

these changes can break icingadb-web or can be reverted during an update but it instantly affects every icingadb tab

I’ll give it a try based on your information.

Thank you!