[icinga-checkins] icinga.org: icingaweb2/bugfix/ remove-leading-and-trailing-whitespace-from-text-12208: Host/ service header: don' t automatically select parentheses around monitored object's name

git at icinga.org git at icinga.org
Wed Aug 31 11:45:35 CEST 2016


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

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

Host/service header: don't automatically select parentheses around monitored object's name

refs #12208

---

 .../application/views/scripts/partials/object/host-header.phtml  |    3 ++-
 .../views/scripts/partials/object/service-header.phtml           |    6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/monitoring/application/views/scripts/partials/object/host-header.phtml b/modules/monitoring/application/views/scripts/partials/object/host-header.phtml
index 34315f9..22bafcc 100644
--- a/modules/monitoring/application/views/scripts/partials/object/host-header.phtml
+++ b/modules/monitoring/application/views/scripts/partials/object/host-header.phtml
@@ -17,7 +17,8 @@ use Icinga\Module\Monitoring\Object\Host;
             echo $this->iconImage()->host($object);
             echo '<span class="selectable">' . $this->escape($object->host_display_name) . '</span>';
             if ($object->host_display_name !== $object->host_name) {
-                echo ' <span class="selectable host-meta">(' . $this->escape($object->host_name) . ')</span>';
+                echo ' <span class="host-meta">(<span class="selectable">' . $this->escape($object->host_name)
+                    . '</span>)</span>';
             }
             if ($object->host_alias !== $object->host_display_name && $object->host_alias !== $object->host_name) {
                 echo '<div class="selectable host-meta">'
diff --git a/modules/monitoring/application/views/scripts/partials/object/service-header.phtml b/modules/monitoring/application/views/scripts/partials/object/service-header.phtml
index bc23fce..aa4b142 100644
--- a/modules/monitoring/application/views/scripts/partials/object/service-header.phtml
+++ b/modules/monitoring/application/views/scripts/partials/object/service-header.phtml
@@ -18,7 +18,8 @@ use Icinga\Module\Monitoring\Object\Service;
             echo $this->iconImage()->host($object);
             echo '<span class="selectable">' . $this->escape($object->host_display_name) . '</span>';
             if ($object->host_display_name !== $object->host_name) {
-                echo ' <span class="selectable host-meta">(' . $this->escape($object->host_name) . ')</span>';
+                echo ' <span class="host-meta">(<span class="selectable">' . $this->escape($object->host_name)
+                    . '</span>)</span>';
             }
             echo $this->render('partials/host/statusicons.phtml');
             if ($object->host_address6 && $object->host_address6 !== $object->host_name) {
@@ -48,7 +49,8 @@ use Icinga\Module\Monitoring\Object\Service;
             echo $this->translate('Service')
                 . ': <span class="selectable">' . $this->escape($object->service_display_name) . '</span>';
             if ($object->service_display_name !== $object->service_description) {
-                echo ' <span class="selectable service-meta">(' . $this->escape($object->service_description) . ')</span>';
+                echo ' <span class="service-meta">(<span class="selectable">'
+                    . $this->escape($object->service_description) . '</span>)</span>';
             }
             echo $this->render('partials/service/statusicons.phtml');
         ?></td>



More information about the icinga-checkins mailing list