Permalink
Browse files

Object url defaults can be set in map global section

  * The default values for the "url" option of map objects can now be
    configured in the map global sections using the options
    host_url, hostgroup_url, service_url, servicegroup_url, map_url,
    dyngroup_url and aggr_url
  • Loading branch information...
LarsMichelsen committed Jun 14, 2017
1 parent fc410f2 commit a9220dd79cd5e4acb402d3900aaf3f963fea7c69
View
@@ -1,4 +1,9 @@
1.9.2
Core:
* The default values for the "url" option of map objects can now be
configured in the map global sections using the options
host_url, hostgroup_url, service_url, servicegroup_url, map_url,
dyngroup_url and aggr_url
1.9.1
Core:
@@ -267,6 +267,51 @@ <h2>Description of the object types</h2>
<tr>
<td> url_target </td><td> _self </td><td> Target of the Icon link, this option adapts &lt;a target=""> (_self is same window) </td>
</tr>
<tr>
<td>host_url</td>
<td>inherited (<a href="nagvis_config_format_description.html">nagvis.ini.php</a>)</td>
<td>The default url to follow when a user left-clicks on a host object. Available macros: [htmlcgi], [htmlbase], [host_name], [backend_id]</td>
</tr>
<tr>
<td>hostgroup_url</td>
<td>inherited (<a href="nagvis_config_format_description.html">nagvis.ini.php</a>)</td>
<td>The default url to follow when a user left-clicks on an hostgroup object.
Available macros: [htmlcgi], [htmlbase], [hostgroup_name], [backend_id]</td>
</tr>
<tr>
<td>serviceurl</td>
<td>inherited (<a href="nagvis_config_format_description.html">nagvis.ini.php</a>)</td>
<td>The default url to follow when a user left-clicks on an service object.
Available macros: [htmlcgi], [htmlbase], [host_name], [service_description], [backend_id]</td>
</tr>
<tr>
<td>servicegroup_url</td>
<td>inherited (<a href="nagvis_config_format_description.html">nagvis.ini.php</a>)</td>
<td>The default url to follow when a user left-clicks on an servicegroup object.
Available macros: [htmlcgi], [htmlbase], [servicegroup_name], [backend_id]</td>
</tr>
<tr>
<td>dyngroup_url</td>
<td>inherited (<a href="nagvis_config_format_description.html">nagvis.ini.php</a>)</td>
<td>The default url to follow when a user left-clicks on a dynamic group object.
This is disabled by default, because there is no good link target in the default
web GUI. So if you use another web GUI, there might be a useful target.
Available macros: [htmlcgi], [htmlbase], [dyngroup_name], [backend_id]</td>
</tr>
<tr>
<td>aggr_url</td>
<td>inherited (<a href="nagvis_config_format_description.html">nagvis.ini.php</a>)</td>
<td>The default url to follow when a user left-clicks on an aggregation object.
Available macros: [htmlcgi], [htmlbase], [aggr_name], [backend_id]</td>
</tr>
<tr>
<td>map_url</td>
<td>inherited (<a href="nagvis_config_format_description.html">nagvis.ini.php</a>)</td>
<td>The default url to follow when a user left-clicks on an map object.
Available macros: [htmlcgi], [htmlbase], [map_name]</td>
</tr>
<tr>
<td>zoom</td>
<td>100</td>
@@ -218,6 +218,19 @@ private function gatherTypeDefaults($onlyGlobal) {
$this->typeDefaults['line'][$sVar] = $sTmp;
}
}
$types_with_url = array(
"host",
"hostgroup",
"service",
"servicegroup",
"map",
"dyngroup",
"aggr",
);
foreach ($types_with_url as $type_name) {
$this->typeDefaults[$type_name]["url"] = $this->getValue(0, $type_name."_url");
}
}
/**
@@ -1020,6 +1020,13 @@ function listSources($MAPCFG, $objId, $attrs) {
'only_hard_states' => null,
'recognize_services' => null,
'url_target' => null,
'host_url' => null,
'hostgroup_url' => null,
'service_url' => null,
'servicegroup_url' => null,
'map_url' => null,
'dyngroup_url' => null,
'aggr_url' => null,
),
'events' => array(
'event_on_load' => null,

0 comments on commit a9220dd

Please sign in to comment.