Allow specifying "global-overview" as default map#54
Conversation
Allow specifying default-map = global-overview
|
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.
Where does the hard-coded |
|
Hi there, 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: |
|
Hi, 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 |
| $url = $baseurl . '/frontend/nagvis-js/index.php'; | ||
| $url .= '?mod=Map&act=view&show=' . urlencode($map); | ||
|
|
||
| if($map == 'global-overview') { |
There was a problem hiding this comment.
Is this change still relevant to you? If so, I suggest to rewrite the code block from line 71 to 79 as follows:
$baseurl = $this->Config()->get('global', 'baseurl', '/nagvis');
$url = $baseurl . '/frontend/nagvis-js/index.php';
if ($map === 'global-overview') {
$url .= '?mod=Overview';
} else {
$url .= '?mod=Map&act=view&show=' . urlencode($map);
}Could you please also add a section to the FAQ or another suitable Markdown file documenting the use of the NagVis global overview?

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.