diff --git a/modules/monitoring/application/views/scripts/hosts/show.phtml b/modules/monitoring/application/views/scripts/hosts/show.phtml index 3c7dafbc5..516e1be03 100644 --- a/modules/monitoring/application/views/scripts/hosts/show.phtml +++ b/modules/monitoring/application/views/scripts/hosts/show.phtml @@ -14,7 +14,7 @@
= $this->escape($this->ellipsis($service->service_output, 10000)); ?>
diff --git a/modules/monitoring/application/views/scripts/services/show.phtml b/modules/monitoring/application/views/scripts/services/show.phtml index 93e4ae84a..522d32ce7 100644 --- a/modules/monitoring/application/views/scripts/services/show.phtml +++ b/modules/monitoring/application/views/scripts/services/show.phtml @@ -16,7 +16,7 @@>
- = strtoupper(Host::getStateText($object->host_state, true)); ?> + = Host::getStateText($object->host_state, true); ?> = $this->prefixedTimeSince($object->host_last_state_change, true) ?> |
@@ -31,7 +31,7 @@ $isService = $object->getType() === $object::TYPE_SERVICE; |
- = strtoupper(Service::getStateText($object->service_state, true)); ?> + = Service::getStateText($object->service_state, true); ?> = $this->prefixedTimeSince($object->service_last_state_change, true) ?> |
diff --git a/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml b/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml index 3c603786a..641dd026a 100644 --- a/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml +++ b/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml @@ -17,7 +17,7 @@ $currentUrl = Url::fromRequest()->without('limit')->getRelativeUrl(); $object->stats->services_ok, $selfUrl, array('service_state' => 0), - array('title' => sprintf($this->translate('Services with state %s'), strtoupper($this->translate('ok')))) + array('title' => sprintf($this->translate('Services with state %s'), $this->translate('OK'))) ) ?> 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $ $object->stats->$unhandled, $selfUrl, $paramsUnhandled, - array('title' => sprintf($this->translate('Unhandled services with state %s'), strtoupper($this->translate($state)))) + array('title' => sprintf($this->translate('Unhandled services with state %s'), $this->translate(strtoupper($state)))) ); } if ($object->stats->$handled) { @@ -65,7 +65,7 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $ $object->stats->$handled, $selfUrl, $paramsHandled, - array('title' => sprintf($this->translate('Handled services with state %s'), strtoupper($this->translate($state)))) + array('title' => sprintf($this->translate('Handled services with state %s'), $this->translate(strtoupper($state)))) ); if ($object->stats->$unhandled) { echo "\n"; @@ -81,7 +81,7 @@ foreach (array(2 => 'critical', 3 => 'unknown', 1 => 'warning') as $stateId => $ $object->stats->services_pending, $selfUrl, array('service_state' => 99), - array('title' => sprintf($this->translate('Services with state %s'), strtoupper($this->translate('pending')))) + array('title' => sprintf($this->translate('Services with state %s'), $this->translate('PENDING'))) ) ?> diff --git a/modules/monitoring/application/views/scripts/show/history.phtml b/modules/monitoring/application/views/scripts/show/history.phtml index a0cc4944e..40fb15363 100644 --- a/modules/monitoring/application/views/scripts/show/history.phtml +++ b/modules/monitoring/application/views/scripts/show/history.phtml @@ -92,21 +92,13 @@ function contactsLink($match, $view) { $msg = '[ ' . $event->attempt . '/' . $event->max_attempts . ' ] ' . $this->escape($event->output); $stateClass = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); $icon = 'attention-alt'; - $title = strtoupper( - $isService - ? Service::getStateText($event->state) - : Host::getStateText($event->state) - ); + $title = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); break; case 'soft_state': $icon = 'spinner'; $msg = '[ ' . $event->attempt . '/' . $event->max_attempts . ' ] ' . $this->escape($event->output); $stateClass = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); - $title = strtoupper( - $isService - ? Service::getStateText($event->state) - : Host::getStateText($event->state) - ); + $title = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); break; case 'dt_start': $icon = 'downtime_start'; diff --git a/modules/monitoring/library/Monitoring/Object/Host.php b/modules/monitoring/library/Monitoring/Object/Host.php index eeac94cb9..8f7df07cb 100644 --- a/modules/monitoring/library/Monitoring/Object/Host.php +++ b/modules/monitoring/library/Monitoring/Object/Host.php @@ -173,16 +173,16 @@ class Host extends MonitoredObject $translate = (bool) $translate; switch ((int) $state) { case self::STATE_UP: - $text = $translate ? mt('monitoring', 'up') : 'up'; + $text = $translate ? mt('monitoring', 'UP') : 'up'; break; case self::STATE_DOWN: - $text = $translate ? mt('monitoring', 'down') : 'down'; + $text = $translate ? mt('monitoring', 'DOWN') : 'down'; break; case self::STATE_UNREACHABLE: - $text = $translate ? mt('monitoring', 'unreachable') : 'unreachable'; + $text = $translate ? mt('monitoring', 'UNREACHABLE') : 'unreachable'; break; case self::STATE_PENDING: - $text = $translate ? mt('monitoring', 'pending') : 'pending'; + $text = $translate ? mt('monitoring', 'PENDING') : 'pending'; break; default: throw new InvalidArgumentException('Invalid host state \'%s\'', $state); diff --git a/modules/monitoring/library/Monitoring/Object/Service.php b/modules/monitoring/library/Monitoring/Object/Service.php index 3b7bff4fa..870ff78ba 100644 --- a/modules/monitoring/library/Monitoring/Object/Service.php +++ b/modules/monitoring/library/Monitoring/Object/Service.php @@ -214,19 +214,19 @@ class Service extends MonitoredObject $translate = (bool) $translate; switch ((int) $state) { case self::STATE_OK: - $text = $translate ? mt('monitoring', 'ok') : 'ok'; + $text = $translate ? mt('monitoring', 'OK') : 'ok'; break; case self::STATE_WARNING: - $text = $translate ? mt('monitoring', 'warning') : 'warning'; + $text = $translate ? mt('monitoring', 'WARNING') : 'warning'; break; case self::STATE_CRITICAL: - $text = $translate ? mt('monitoring', 'critical') : 'critical'; + $text = $translate ? mt('monitoring', 'CRITICAL') : 'critical'; break; case self::STATE_UNKNOWN: - $text = $translate ? mt('monitoring', 'unknown') : 'unknown'; + $text = $translate ? mt('monitoring', 'UNKNOWN') : 'unknown'; break; case self::STATE_PENDING: - $text = $translate ? mt('monitoring', 'pending') : 'pending'; + $text = $translate ? mt('monitoring', 'PENDING') : 'pending'; break; default: throw new InvalidArgumentException('Invalid service state \'%s\'', $state); |