[icinga-checkins] icinga.org: icingaweb2/bugfix/ remove-leading-and-trailing-whitespace-from-text-12208: Remove leading and trailing whitespace from host status icons partial

git at icinga.org git at icinga.org
Wed Aug 31 11:22:03 CEST 2016


Module: icingaweb2
Branch: bugfix/remove-leading-and-trailing-whitespace-from-text-12208
Commit: 0e5b2806fd305e16641b37591e4b1a54b842e83b
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=0e5b2806fd305e16641b37591e4b1a54b842e83b

Author: Alexander A. Klimov <alexander.klimov at netways.de>
Date:   Wed Aug 31 11:20:59 2016 +0200

Remove leading and trailing whitespace from host status icons partial

refs #12208

---

 .../views/scripts/partials/host/statusicons.phtml       |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml b/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml
index 4421c30..67c162b 100644
--- a/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml
+++ b/modules/monitoring/application/views/scripts/partials/host/statusicons.phtml
@@ -1,28 +1,25 @@
 <?php
 
-$icons = array();
 if (! $this->object->host_handled && $this->object->host_state > 0) {
-    $icons[] = $this->icon('attention-alt', $this->translate('Unhandled'));
+    echo $this->icon('attention-alt', $this->translate('Unhandled'));
 }
 
 if ($this->object->host_acknowledged && !$this->object->host_in_downtime) {
-    $icons[] = $this->icon('ok', $this->translate('Acknowledged'));
+    echo $this->icon('ok', $this->translate('Acknowledged'));
 }
 
 if (! $this->object->host_notifications_enabled) {
-    $icons[] = $this->icon('bell-off-empty', $this->translate('Notifications Disabled'));
+    echo $this->icon('bell-off-empty', $this->translate('Notifications Disabled'));
 }
 
 if ($this->object->host_in_downtime) {
-    $icons[] = $this->icon('plug', $this->translate('In Downtime'));
+    echo $this->icon('plug', $this->translate('In Downtime'));
 }
 
 if (! $this->object->host_active_checks_enabled) {
     if ($this->object->host_passive_checks_enabled) {
-        $icons[] = $this->icon('eye-off', $this->translate('Active Checks Disabled'));
+        echo $this->icon('eye-off', $this->translate('Active Checks Disabled'));
     } else {
-        $icons[] = $this->icon('eye-off', $this->translate('Active And Passive Checks Disabled'));
+        echo $this->icon('eye-off', $this->translate('Active And Passive Checks Disabled'));
     }
 }
-
-?><?= implode("\n", $icons); ?>
\ No newline at end of file



More information about the icinga-checkins mailing list