Icinga / icingaweb2-module-nagvis

NagVis integration into Icinga web 2
GNU General Public License v2.0
39 stars 22 forks source link

Allow specifying "global-overview" as default map #54

Open mj84 opened 1 year ago

mj84 commented 1 year ago

I implemented a quick way to allow the use of "global-overview" as the default map. While mod=Overview does not respect header_menu=0 it is still nice to have a simple way to include the NagVis default overview.

yhabteab commented 1 year ago

Hi, thanks for contributing! Though, I'm not quite sure yet what this is supposed to fix. There's already an option, as far as I can see, that lets you define your own default map.

I implemented a quick way to allow the use of "global-overview" as the default map.

Where does the hard-coded global-overview map name come from?

mj84 commented 1 year ago

Hi there, sorry it took me a while to come back to you. Currently, it is not possible to use NagVis' own overview (which is called via URL parameters mod=Overview) when using this module. Since we are running quite a lot of NagVis maps, which also change semi-frequently, it is not feasible to manually create a map which links to other maps and use that "map" as an overview. There is a comment in the source code at https://github.com/Icinga/icingaweb2-module-nagvis/blob/140347ab4fae1c5b828b6020656fc18dd9bbbb6d/application/controllers/ShowController.php#L54 which states, that mod=Overview is currently not being used in this module because it doesn't respect the header_menu=0 parameter. My PR restores this functionality by explicitly setting the default map to "global-overview" and the overview menu of NagVis returns:

image

mj84 commented 2 months ago

Hi, any thoughts about this? For us, the native NagVis overview is really useful, I bet others would benefit from this as well.

That being said, I guess the "proper" solution would be a native overview implementation within this module, but this exceeds my abilities in Icingaweb2 module development by far :)

So this could be used as a temporary solution to provide an overview of accessible maps until a better one is available.

Best regards