From ebb0db3800ed5ada1cac90c3bfff940c1cabc273 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 1 Oct 2015 00:42:32 +0200 Subject: [PATCH] monitoring: Re-add support for displaying ipv6 addresses refs #5543 --- .../scripts/partials/object/host-header.phtml | 14 +++++++++++--- .../scripts/partials/object/service-header.phtml | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 7 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 9ca251a8d5..35f17489a7 100644 --- a/modules/monitoring/application/views/scripts/partials/object/host-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/object/host-header.phtml @@ -14,13 +14,21 @@ use Icinga\Module\Monitoring\Object\Host;

iconImage()->host($object) ?> - escape($object->host_display_name) ?> + escape($object->host_display_name) ?> host_display_name !== $object->host_name): ?> - (escape($object->host_name) ?>) + (escape($object->host_name) ?>) + + host_address6 && $object->host_address6 !== $object->host_name): ?> +
+ + escape($object->host_address6) ?> + host_address && $object->host_address !== $object->host_name): ?>
- escape($object->host_address) ?> + + escape($object->host_address) ?> + render('partials/host/statusicons.phtml') ?>

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 ee8563645d..4a34113fed 100644 --- a/modules/monitoring/application/views/scripts/partials/object/service-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/object/service-header.phtml @@ -15,13 +15,21 @@ use Icinga\Module\Monitoring\Object\Service;

iconImage()->service($object) ?> - escape($object->host_display_name) ?> + escape($object->host_display_name) ?> host_display_name !== $object->host_name): ?> - (escape($object->host_name) ?>) + (escape($object->host_name) ?>) + + host_address6 && $object->host_address6 !== $object->host_name): ?> +
+ + escape($object->host_address6) ?> + host_address && $object->host_address !== $object->host_name): ?>
+ escape($object->host_address) ?> + render('partials/host/statusicons.phtml') ?>

@@ -38,9 +46,9 @@ use Icinga\Module\Monitoring\Object\Service;

iconImage()->host($object) ?> - translate('Service') ?>: escape($object->service_display_name) ?> + translate('Service') ?>: escape($object->service_display_name) ?> service_display_name !== $object->service_description): ?> - (escape($object->service_description) ?>) + (escape($object->service_description) ?>) render('partials/service/statusicons.phtml') ?>