diff --git a/application/views/helpers/RenderStateBadges.php b/application/views/helpers/RenderStateBadges.php index 1ee80cc..14db762 100644 --- a/application/views/helpers/RenderStateBadges.php +++ b/application/views/helpers/RenderStateBadges.php @@ -2,24 +2,16 @@ class Zend_View_Helper_RenderStateBadges extends Zend_View_Helper_Abstract { - protected $stateNames = array( - 0 => 'OK', - 1 => 'WARNING', - 2 => 'CRITICAL', - 3 => 'UNKNOWN', - 99 => 'PENDING', - ); - public function renderStateBadges($summary) { $html = ''; foreach ($summary as $state => $cnt) { if ($cnt === 0) continue; - if ($state === 0) continue; - $stateName = $this->stateNames[$state]; - $html .= '' + if ($state === 'OK') continue; + if ($state === 'UP') continue; + $html .= '' . $cnt . ''; }