Module: nagvis Branch: master Commit: 78851048d5ddc586783b3394d9f4416b9486e1b3 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=78851048d5ddc586783b3394d9f4416b9486e1b3
Author: LaMi <[email protected]> Date: Tue Nov 17 21:52:33 2009 +0100 Changed service/servicegroup icons to correct icons when in UNKNOWN state and acked or in downtime --- .../core/classes/objects/NagVisStatefulObject.php | 22 +++++++++---------- 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/share/server/core/classes/objects/NagVisStatefulObject.php b/share/server/core/classes/objects/NagVisStatefulObject.php index 9fd5a94..faba25d 100644 --- a/share/server/core/classes/objects/NagVisStatefulObject.php +++ b/share/server/core/classes/objects/NagVisStatefulObject.php @@ -535,14 +535,22 @@ class NagVisStatefulObject extends NagVisObject { if($this->getSummaryState() != '') { $stateLow = strtolower($this->getSummaryState()); + // Get object type prefix + $sPre = ''; + if($this->getType() == 'service' || $this->getType() == 'servicegroup') { + $sPre = 's'; + } + switch($stateLow) { case 'unknown': case 'unreachable': case 'down': + case 'critical': + case 'warning': if($this->getSummaryAcknowledgement() == 1) { - $icon = $this->iconset.'_ack.'.$fileType; + $icon = $this->iconset.'_'.$sPre.'ack.'.$fileType; } elseif($this->getSummaryInDowntime() == 1) { - $icon = $this->iconset.'_downtime.'.$fileType; + $icon = $this->iconset.'_'.$sPre.'downtime.'.$fileType; } else { // Handle unreachable state with down icon if($stateLow == 'unreachable') { @@ -551,16 +559,6 @@ class NagVisStatefulObject extends NagVisObject { $icon = $this->iconset.'_'.$stateLow.'.'.$fileType; } break; - case 'critical': - case 'warning': - if($this->getSummaryAcknowledgement() == 1) { - $icon = $this->iconset.'_sack.'.$fileType; - } elseif($this->getSummaryInDowntime() == 1) { - $icon = $this->iconset.'_sdowntime.'.$fileType; - } else { - $icon = $this->iconset.'_'.$stateLow.'.'.$fileType; - } - break; case 'up': case 'ok': if($this->getType() == 'service' || $this->getType() == 'servicegroup') { ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
