From 9c3da17f2e30752ddaf4a15a6244f8d7c2c7d1e6 Mon Sep 17 00:00:00 2001 From: Jennifer Mourek Date: Mon, 27 May 2019 11:44:02 +0200 Subject: [PATCH 01/16] Improve host-service distinction for hosts, services, comments and downtimes --- .../views/scripts/list/services.phtml | 77 ++++++++++++------- .../partials/comment/comment-detail.phtml | 47 +++++++---- .../partials/downtime/downtime-header.phtml | 57 +++++++++----- modules/monitoring/public/css/module.less | 10 +++ modules/monitoring/public/css/tables.less | 4 + 5 files changed, 136 insertions(+), 59 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/services.phtml b/modules/monitoring/application/views/scripts/list/services.phtml index 7deacaf59..0c7865316 100644 --- a/modules/monitoring/application/views/scripts/list/services.phtml +++ b/modules/monitoring/application/views/scripts/list/services.phtml @@ -61,33 +61,56 @@ if (! $this->compact): ?>
- iconImage()->service($service) ?> - showHost): ?>qlink( - $service->host_display_name - . ($service->host_state != 0 ? ' (' . Host::getStateText($service->host_state, true) . ')' : ''), - $hostLink, - null, - array( - 'title' => sprintf( - $this->translate('Show detailed information for host %s'), - $service->host_display_name - ) - ) - ) ?>: - qlink( - $service->service_display_name, - $serviceLink, - null, - array( - 'title' => sprintf( - $this->translate('Show detailed information for service %s on host %s'), - $service->service_display_name, - $service->host_display_name - ), - 'class' => 'rowaction' - ) - ) ?> - serviceFlags($service) ?> + + iconImage()->service($service) ?> + showHost) { + echo sprintf( + $this->translate('%s on %s', 'service on host'), + $this->qlink( + $service->service_display_name, + $serviceLink, + null, + array( + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $service->service_display_name, + $service->host_display_name + ), + 'class' => 'rowaction' + ) + ), + $this->qlink( + $service->host_display_name + . ($service->host_state != 0 ? ' (' . Host::getStateText($service->host_state, true) . ')' : ''), + $hostLink, + null, + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $service->host_display_name + ) + ] + ) + ); + } else { + echo $this->qlink( + $service->service_display_name, + $serviceLink, + null, + array( + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $service->service_display_name, + $service->host_display_name + ), + 'class' => 'rowaction' + ) + ); + } + ?> + + serviceFlags($service) ?>
diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml index e16cba124..4b769d44a 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml @@ -1,23 +1,42 @@
objecttype === 'service') { - echo $this->icon('service', $this->translate('Service')); - echo $this->qlink( - $comment->host_display_name . ': ' . $comment->service_display_name, - 'monitoring/service/show', - array( - 'host' => $comment->host_name, - 'service' => $comment->service_description + echo ''; + echo sprintf( + $this->translate('%s on %s', 'service on host'), + $this->qlink( + $comment->service_display_name, + 'monitoring/service/show', + [ + 'host' => $comment->host_name, + 'service' => $comment->service_description + ], + null, + [ + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $comment->service_display_name, + $comment->host_display_name + ), + 'class' => 'rowaction' + ] ), - array( - 'title' => sprintf( - $this->translate('Show detailed information for this comment about service %s on host %s'), - $comment->service_display_name, - $comment->host_display_name - ) + $this->qlink( + $comment->host_display_name, + $this->href( + 'monitoring/host/show', + ['host' => $comment->host_name] + ), + null, + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $comment->host_display_name + ) + ] ) ); + echo ''; } else { - echo $this->icon('host', $this->translate('Host')); echo $this->qlink( $comment->host_display_name, 'monitoring/host/show', diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml index 9e733f7aa..d6b05e809 100644 --- a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml @@ -9,24 +9,45 @@
- - icon('service', $this->translate('Service')); ?> qlink( - $downtime->host_display_name . ': ' . $downtime->service_display_name, - 'monitoring/service/show', - array( - 'host' => $downtime->host_name, - 'service' => $downtime->service_description + '; + echo sprintf( + $this->translate('%s on %s', 'service on host'), + $this->qlink( + $downtime->service_display_name, + 'monitoring/service/show', + [ + 'host' => $downtime->host_name, + 'service' => $downtime->service_description + ], + null, + [ + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $downtime->service_display_name, + $downtime->host_display_name + ), + 'class' => 'rowaction' + ] ), - array( - 'title' => sprintf( - $this->translate('Show detailed information for this downtime scheduled for service %s on host %s'), - $downtime->service_display_name, - $downtime->host_display_name - ) + $this->qlink( + $downtime->host_display_name, + $this->href( + 'monitoring/host/show', + ['host' => $downtime->host_name] + ), + null, + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $downtime->host_display_name + ) + ] ) - ); ?> - - icon('host', $this->translate('host')); ?> qlink( + ); + echo ''; + } else { + echo $this->qlink( $downtime->host_display_name, 'monitoring/host/show', array('host' => $downtime->host_name, 'downtime_id' => $downtime->id), @@ -36,8 +57,8 @@ $downtime->host_display_name ) ) - ); ?> - + ); + } ?> escape(sprintf( $downtime->is_flexible diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index 8ba1b29d6..e34847214 100644 --- a/modules/monitoring/public/css/module.less +++ b/modules/monitoring/public/css/module.less @@ -175,6 +175,16 @@ } } +.service-on { + color: @text-color-light; + + > a { + color: @text-color; + letter-spacing: normal; + font-weight: bold; + } +} + // State table in the host and service multi-selection and detail views .host-detail-state, .service-detail-state { diff --git a/modules/monitoring/public/css/tables.less b/modules/monitoring/public/css/tables.less index efb4bdbf4..6fa35e8de 100644 --- a/modules/monitoring/public/css/tables.less +++ b/modules/monitoring/public/css/tables.less @@ -205,6 +205,10 @@ // Wraps links, icons and meta in overviews .state-header { .clearfix(); + + > a { + font-weight: bold; + } } // State icons, e.g. acknowledged in overviews From 4323c060cecbd2fbde603bc8125bab715cb03430 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 15:45:24 +0200 Subject: [PATCH 02/16] Remove icons from notifications view --- .../application/views/scripts/list/notifications.phtml | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml index b9269fb6d..8fddc78b6 100644 --- a/modules/monitoring/application/views/scripts/list/notifications.phtml +++ b/modules/monitoring/application/views/scripts/list/notifications.phtml @@ -41,7 +41,6 @@ if (! $this->compact): ?>
- icon('service', $this->translate('Service')); ?> link()->service( $notification->service_description, $notification->service_display_name, @@ -50,7 +49,6 @@ if (! $this->compact): ?> 'rowaction' ) ?> - icon('host', $this->translate('Host')); ?> link()->host($notification->host_name, $notification->host_display_name) ?> contact): ?> From 0efe72b429b5e1a550e0fdb3ef2b1ed6cf0bed71 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 15:45:53 +0200 Subject: [PATCH 03/16] Make contact name bold in the contacts view --- .../monitoring/application/views/scripts/list/contacts.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/contacts.phtml b/modules/monitoring/application/views/scripts/list/contacts.phtml index f712ada8a..68f8d3eeb 100644 --- a/modules/monitoring/application/views/scripts/list/contacts.phtml +++ b/modules/monitoring/application/views/scripts/list/contacts.phtml @@ -25,7 +25,7 @@ peekAhead($this->compact) as $contact): ?> - + qlink( $contact->contact_name, 'monitoring/show/contact', @@ -37,7 +37,7 @@ ) ) ) ?> - + translate('Email') ?>: Date: Fri, 26 Jul 2019 15:46:06 +0200 Subject: [PATCH 04/16] Make contact group name bold in the contact groups view --- .../application/views/scripts/list/contactgroups.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/contactgroups.phtml b/modules/monitoring/application/views/scripts/list/contactgroups.phtml index 591b1d385..125aeeae8 100644 --- a/modules/monitoring/application/views/scripts/list/contactgroups.phtml +++ b/modules/monitoring/application/views/scripts/list/contactgroups.phtml @@ -30,7 +30,7 @@ if (! $this->compact): ?> contact_count ?> - + qlink( $contactGroup->contactgroup_name, 'monitoring/list/contacts', @@ -40,7 +40,7 @@ if (! $this->compact): ?> $contactGroup->contactgroup_name )) ) ?> - + contactgroup_name !== $contactGroup->contactgroup_alias): ?> contactgroup_alias ?> From 99ff0585610f559ce8d6d62c50b67c04cb93f5b6 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 16:29:16 +0200 Subject: [PATCH 05/16] Improve host-service distinction for notifications --- .../views/scripts/list/notifications.phtml | 54 +++++++++++++++---- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml index 8fddc78b6..eb5613522 100644 --- a/modules/monitoring/application/views/scripts/list/notifications.phtml +++ b/modules/monitoring/application/views/scripts/list/notifications.phtml @@ -40,17 +40,51 @@ if (! $this->compact): ?>
- - link()->service( - $notification->service_description, - $notification->service_display_name, - $notification->host_name, + '; + echo sprintf( + $this->translate('%s on %s', 'service on host'), + $this->qlink( + $notification->service_display_name, + 'monitoring/service/show', + [ + 'host' => $notification->host_name, + 'service' => $notification->service_description + ], + [ + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $notification->service_display_name, + $notification->host_display_name + ) + ] + ), + $this->qlink( + $notification->host_display_name, + 'monitoring/host/show', + ['host' => $notification->host_name], + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $notification->host_display_name + ) + ] + ) + ); + echo ''; + } else { + echo $this->qlink( $notification->host_display_name, - 'rowaction' - ) ?> - - link()->host($notification->host_name, $notification->host_display_name) ?> - + 'monitoring/host/show', + ['host' => $notification->host_name], + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $notification->host_display_name + ) + ] + ); + } ?> contact): ?>
notification_contact_name): ?> From 98388c434641df681c1f77a5b8ae5e165ea4da09 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 16:38:25 +0200 Subject: [PATCH 06/16] Link to the event detail from the notifications view --- modules/monitoring/application/controllers/ListController.php | 1 + .../application/views/scripts/list/notifications.phtml | 2 +- .../library/Monitoring/Backend/Ido/Query/NotificationQuery.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index b9c71777e..f45ec096d 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -280,6 +280,7 @@ class ListController extends Controller $this->setAutorefreshInterval(15); $notifications = $this->backend->select()->from('notification', array( + 'id', 'host_display_name', 'host_name', 'notification_contact_name', diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml index eb5613522..14e33b654 100644 --- a/modules/monitoring/application/views/scripts/list/notifications.phtml +++ b/modules/monitoring/application/views/scripts/list/notifications.phtml @@ -31,7 +31,7 @@ if (! $this->compact): ?> $stateName = Host::getStateText($notification->notification_state); } ?> - +
diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php index f85195123..9af24f79b 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php @@ -22,6 +22,7 @@ class NotificationQuery extends IdoQuery */ protected $columnMap = array( 'notifications' => array( + 'id' => 'n.id', 'instance_name' => 'n.instance_name', 'notification_contact_name' => 'n.notification_contact_name', 'notification_output' => 'n.notification_output', From 227cb2c51237ea44e5c019354580078c0041fd9e Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 16:48:22 +0200 Subject: [PATCH 07/16] Fix grouping error when selecting the notification id --- .../Monitoring/Backend/Ido/Query/HostnotificationQuery.php | 2 +- .../Monitoring/Backend/Ido/Query/ServicenotificationQuery.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php index 21e804652..d9ce93bdb 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php @@ -34,7 +34,6 @@ class HostnotificationQuery extends IdoQuery 'host_display_name' => 'h.display_name COLLATE latin1_general_ci' ), 'history' => array( - 'id' => 'hn.notification_id', 'output' => null, 'state' => 'hn.state', 'timestamp' => 'UNIX_TIMESTAMP(hn.start_time)', @@ -54,6 +53,7 @@ class HostnotificationQuery extends IdoQuery 'instance_name' => 'i.instance_name' ), 'notifications' => array( + 'id' => 'hn.notification_id', 'host' => 'ho.name1 COLLATE latin1_general_ci', 'host_name' => 'ho.name1', 'notification_output' => 'hn.output', diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicenotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicenotificationQuery.php index 3c94cac71..573854a3c 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicenotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicenotificationQuery.php @@ -26,7 +26,6 @@ class ServicenotificationQuery extends IdoQuery 'notification_contact_name' => 'co.name1' ), 'history' => array( - 'id' => 'sn.notification_id', 'output' => null, 'state' => 'sn.state', 'timestamp' => 'UNIX_TIMESTAMP(sn.start_time)', @@ -54,6 +53,7 @@ class ServicenotificationQuery extends IdoQuery 'instance_name' => 'i.instance_name' ), 'notifications' => array( + 'id' => 'sn.notification_id', 'host' => 'so.name1 COLLATE latin1_general_ci', 'host_name' => 'so.name1', 'notification_output' => 'sn.output', From 5993745a86010a1d1fe9d9b2526c60dc695c5c4d Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 17:11:48 +0200 Subject: [PATCH 08/16] Select notification id --- modules/monitoring/application/controllers/ShowController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index 9c23b9929..f00ab8a52 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -63,6 +63,7 @@ class ShowController extends Controller $this->view->commands = $commands; $notifications = $this->backend->select()->from('notification', array( + 'id', 'host_name', 'service_description', 'notification_output', From 5b3cbb0ffe8246374f4cc0fdd2f888dd7e28dba2 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 17:12:01 +0200 Subject: [PATCH 09/16] Fix title attributes in the downtime header --- .../views/scripts/partials/downtime/downtime-header.phtml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml index d6b05e809..a5c443aa4 100644 --- a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml @@ -20,7 +20,6 @@ 'host' => $downtime->host_name, 'service' => $downtime->service_description ], - null, [ 'title' => sprintf( $this->translate('Show detailed information for service %s on host %s'), @@ -32,11 +31,8 @@ ), $this->qlink( $downtime->host_display_name, - $this->href( - 'monitoring/host/show', - ['host' => $downtime->host_name] - ), - null, + 'monitoring/host/show', + ['host' => $downtime->host_name], [ 'title' => sprintf( $this->translate('Show detailed information for host %s'), From 1f4c970cb387dee26d4125c12c51d355e33823d3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 17:13:28 +0200 Subject: [PATCH 10/16] Fix title attributes in the comment header --- .../views/scripts/partials/comment/comment-detail.phtml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml index 4b769d44a..9b037a333 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml @@ -10,7 +10,6 @@ 'host' => $comment->host_name, 'service' => $comment->service_description ], - null, [ 'title' => sprintf( $this->translate('Show detailed information for service %s on host %s'), @@ -22,11 +21,8 @@ ), $this->qlink( $comment->host_display_name, - $this->href( - 'monitoring/host/show', - ['host' => $comment->host_name] - ), - null, + 'monitoring/host/show', + ['host' => $comment->host_name], [ 'title' => sprintf( $this->translate('Show detailed information for host %s'), From b6a399df1aed1531b78346ab3e8bbf5da3a129b3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 17:13:37 +0200 Subject: [PATCH 11/16] Make host links bold in the comments view --- modules/monitoring/public/css/tables.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/monitoring/public/css/tables.less b/modules/monitoring/public/css/tables.less index 6fa35e8de..959b25402 100644 --- a/modules/monitoring/public/css/tables.less +++ b/modules/monitoring/public/css/tables.less @@ -17,6 +17,10 @@ // Object link and comment author in the comment overview .comment-author { margin-bottom: 0.25em; + + > a { + font-weight: bold; + } } // Comment icons, e.g. persistent in the comment overview From 135601c0dc0dbe95c220475e74b55d2bc405a5c1 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 17:18:28 +0200 Subject: [PATCH 12/16] Add tab to contact detail --- .../monitoring/application/controllers/ShowController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index f00ab8a52..2af7d46d8 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -30,6 +30,13 @@ class ShowController extends Controller { $contactName = $this->params->getRequired('contact_name'); + $this->getTabs()->add('contact-detail', [ + 'title' => $this->translate('Contact details'), + 'label' => $this->translate('Contact'), + 'url' => Url::fromRequest(), + 'active' => true + ]); + $query = $this->backend->select()->from('contact', array( 'contact_name', 'contact_id', From f7ed5de8c86e6801a04011bce19442092be88c83 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 17:18:46 +0200 Subject: [PATCH 13/16] Remove icon from event detail tab --- modules/monitoring/application/controllers/EventController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/monitoring/application/controllers/EventController.php b/modules/monitoring/application/controllers/EventController.php index 324cfb808..e17ffb97a 100644 --- a/modules/monitoring/application/controllers/EventController.php +++ b/modules/monitoring/application/controllers/EventController.php @@ -75,7 +75,6 @@ class EventController extends Controller ->add('event', array( 'title' => $label, 'label' => $label, - 'icon' => $icon, 'url' => Url::fromRequest(), 'active' => true )) From dc3147c6527f1e170ab849ccaa05b6c48fd5656e Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 17:24:09 +0200 Subject: [PATCH 14/16] Improve host-service distinction for events --- .../scripts/partials/event-history.phtml | 62 ++++++++++++------- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/modules/monitoring/application/views/scripts/partials/event-history.phtml b/modules/monitoring/application/views/scripts/partials/event-history.phtml index c97b8d422..c9bae1aba 100644 --- a/modules/monitoring/application/views/scripts/partials/event-history.phtml +++ b/modules/monitoring/application/views/scripts/partials/event-history.phtml @@ -188,35 +188,51 @@ $rowAction = Url::fromPath('monitoring/event/show');
isOverview): ?> - qlink( - $event->host_display_name, - 'monitoring/host/show', - [ - 'host' => $event->host_name, - ], - [ - 'title' => sprintf( - $this->translate('Show detailed information for host %s'), - $event->host_display_name + '; + echo sprintf( + $this->translate('%s on %s', 'service on host'), + $this->qlink( + $event->service_display_name, + 'monitoring/service/show', + [ + 'host' => $event->host_name, + 'service' => $event->service_description + ], + [ + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $event->service_display_name, + $event->host_display_name + ) + ] + ), + $this->qlink( + $event->host_display_name, + 'monitoring/host/show', + ['host' => $event->host_name], + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $event->host_display_name + ) + ] ) - ] - ) ?>: - qlink( - $event->service_display_name, - 'monitoring/service/show', - [ - 'host' => $event->host_name, - 'service' => $event->service_description - ], + ); + echo ''; + } else { + echo $this->qlink( + $event->host_display_name, + 'monitoring/host/show', + ['host' => $event->host_name], [ 'title' => sprintf( - $this->translate('Show detailed information for service %s on host %s'), - $event->service_display_name, + $this->translate('Show detailed information for host %s'), $event->host_display_name ) ] - ) ?> - + ); + } ?> nl2br($this->createTicketLinks($this->markdown($msg, ['class' => 'overview-plugin-output']))) ?>
From 9221e7894c3cef15b551b1a719c891f427779bce Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 17:24:17 +0200 Subject: [PATCH 15/16] Make host names bold in the event history --- modules/monitoring/public/css/tables.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/monitoring/public/css/tables.less b/modules/monitoring/public/css/tables.less index 959b25402..dffb19961 100644 --- a/modules/monitoring/public/css/tables.less +++ b/modules/monitoring/public/css/tables.less @@ -267,5 +267,9 @@ > .history-message-output { flex: 1; + + > a { + font-weight: bold; + } } } From 11097fe75b5d382b21174169ad3d7fe888836692 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 29 Jul 2019 13:31:25 +0200 Subject: [PATCH 16/16] Make host and service names bold in their detail headers --- .../views/scripts/partials/object/host-header.phtml | 2 +- .../views/scripts/partials/object/service-header.phtml | 4 ++-- 2 files changed, 3 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 ac79fd225..4de4a0197 100644 --- a/modules/monitoring/application/views/scripts/partials/object/host-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/object/host-header.phtml @@ -25,7 +25,7 @@ $linkHostName = ! ($url->getPath() === 'monitoring/host/show' && $url->getParam( echo '
'; } ?> - escape($object->host_display_name) ?> + escape($object->host_display_name) ?> host_display_name !== $object->host_name): ?> (escape($object->host_name) ?>) 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 9a12404d8..318fe4985 100644 --- a/modules/monitoring/application/views/scripts/partials/object/service-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/object/service-header.phtml @@ -22,7 +22,7 @@ $linkServiceName = ! ($url->getPath() === 'monitoring/service/show' && $url->get iconImage()->host($object) ?> - escape($object->host_display_name) ?> + escape($object->host_display_name) ?> host_display_name !== $object->host_name): ?> (escape($object->host_name) ?>) @@ -57,7 +57,7 @@ $linkServiceName = ! ($url->getPath() === 'monitoring/service/show' && $url->get )) . '">'; } ?> - escape($object->service_display_name) ?> + escape($object->service_display_name) ?> service_display_name !== $object->service_description): ?> (escape($object->service_description) ?>)