Skip to content

Commit

Permalink
Fix (NagiosEnterprises#539) map link undefined and will no longer sho…
Browse files Browse the repository at this point in the history
…w link when nagios process is set as the root node.
  • Loading branch information
jomann09 authored and msdiamanti committed Mar 1, 2023
1 parent e25e30c commit f21a8f9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
9 changes: 5 additions & 4 deletions Changelog
Expand Up @@ -7,10 +7,11 @@ Nagios Core 4 Change Log
FIXES
* Fixed services sending recovery emails when they recover if host in down state (#572) (Scott Wilkerson)
* Fixed a make error when building on the aarch64 architecture (#598) (Gareth Randall)
* Fixed soft recovery states for services (#575) (Jacob Omann)
* Fixed XSS vulnerability in Alert Summary report (CVE-2018-18245) (Jacob Omann)
* Fixed services in soft states sometimes not switching into hard states (#576) (Jacob Omann)
* Fixed last_state_change to update when a state goes from soft -> hard state (#592) (Jacob Omann)
* Fixed soft recovery states for services (#575) (Jake Omann)
* Fixed XSS vulnerability in Alert Summary report (CVE-2018-18245) (Jake Omann)
* Fixed services in soft states sometimes not switching into hard states (#576) (Jake Omann)
* Fixed last_state_change to update when a state goes from soft -> hard state (#592) (Jake Omann)
* Fixed Map link always being set to undefined host (#539) (Jake Omann)

4.4.2 - 2018-08-16
------------------
Expand Down
9 changes: 8 additions & 1 deletion html/js/nagios-decorations.js
Expand Up @@ -23,7 +23,8 @@ angular.module("nagiosDecorations", [])
lastUpdate: "=lastUpdate",
initialState: "@initialState",
collapsible: "@collapsible",
includePartial: "@includePartial"
includePartial: "@includePartial",
root: "@root"
},
controller: function($scope, $element, $attrs, $http) {

Expand All @@ -34,6 +35,12 @@ angular.module("nagiosDecorations", [])

$scope.haveProgramStatus = false;

// Create cgiurl and root node name
$scope.params = { cgiurl: $scope.cgiurl, root: $scope.root };
$scope.$watch("root", function() {
$scope.params.root = $scope.root;
});

$scope.$watch("cgiurl", function() {
getStatus();
});
Expand Down
6 changes: 3 additions & 3 deletions html/map-links.html
Expand Up @@ -3,16 +3,16 @@
<tr>
<td class="linkBox">
<span ng-show="params.root != 'Nagios Process'">
<a ng-href="{{params.cgiurl}}cgi-bin/status.cgi?host={{params.host | uriComponentEncode}}" target="_self">
<a ng-href="{{params.cgiurl}}status.cgi?host={{params.root | uriComponentEncode}}" target="_self">
View Status Detail For This Host
</a>
<br/>
</span>
<a ng-href="{{params.cgiurl}}cgi-bin/status.cgi?host=all" target="_self">
<a ng-href="{{params.cgiurl}}status.cgi?host=all" target="_self">
View Status Detail For All Hosts
</a>
<br/>
<a ng-href="{{params.cgiurl}}cgi-bin/status.cgi?hostgroup=all" target="_self">
<a ng-href="{{params.cgiurl}}status.cgi?hostgroup=all" target="_self">
View Status Overview For All Hosts
</a>
</td>
Expand Down
3 changes: 2 additions & 1 deletion html/map.php
Expand Up @@ -97,7 +97,8 @@
last-update="lastUpdate"
initial-state="collapsed"
collapsible="true"
include-partial="map-links.html">
include-partial="map-links.html"
root="{{params.root}}">
</div>
</div>
<div id="map-container" ng-hide="formDisplayed"
Expand Down

0 comments on commit f21a8f9

Please sign in to comment.