From dc3147c6527f1e170ab849ccaa05b6c48fd5656e Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 26 Jul 2019 17:24:09 +0200 Subject: [PATCH] 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']))) ?>