From 8ca6cc32b2c789a3149861159ad258f2cb9491e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:39:39 +0200 Subject: Adding upstream version 2.11.4. Signed-off-by: Daniel Baumann --- .../views/scripts/list/notifications.phtml | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 modules/monitoring/application/views/scripts/list/notifications.phtml (limited to 'modules/monitoring/application/views/scripts/list/notifications.phtml') diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml new file mode 100644 index 0000000..51ef432 --- /dev/null +++ b/modules/monitoring/application/views/scripts/list/notifications.phtml @@ -0,0 +1,124 @@ +compact): ?> +
+ tabs ?> + paginator ?> +
+ limiter ?> + sortBox ?> +
+ filterEditor ?> +
+ +
+hasResult()): ?> +

translate('No notifications found matching the filter.') ?>

+
+ + + + peekAhead($this->compact) as $notification): + if (isset($notification->service_description)) { + $isService = true; + $stateLabel = Service::getStateText($notification->notification_state, true); + $stateName = Service::getStateText($notification->notification_state); + } else { + $isService = false; + $stateLabel = Host::getStateText($notification->notification_state, true); + $stateName = Host::getStateText($notification->notification_state); + } + ?> + + + + + + +
+
+
+ formatDateTime($notification->notification_timestamp) ?> +
+
+
+ '; + 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, + '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): ?> + translate('Sent to %s'), + $this->qlink( + $notification->notification_contact_name, + 'monitoring/show/contact', + array('contact_name' => $notification->notification_contact_name) + ) + ) ?> + + translate('Not sent out to any contact') ?> + +
+ +
+

pluginOutput($this->ellipsis($notification->notification_output, 10000), true) ?>

+
+hasMore()): ?> + + + -- cgit v1.2.3