From 6b0e5be05dc249038e6cbcc9e0dc61d5662d9e94 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 3 Nov 2015 09:21:42 +0100 Subject: [PATCH] monitoring: Indent the event history overview w/ 4 spaces --- .../views/scripts/list/eventhistory.phtml | 228 +++++++++--------- 1 file changed, 113 insertions(+), 115 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/eventhistory.phtml b/modules/monitoring/application/views/scripts/list/eventhistory.phtml index cddad22fd..8d47ee41a 100644 --- a/modules/monitoring/application/views/scripts/list/eventhistory.phtml +++ b/modules/monitoring/application/views/scripts/list/eventhistory.phtml @@ -12,129 +12,127 @@ $history->limit($limit * $page); if (! $this->compact): ?>
- tabs; ?> -
- - filterEditor; ?> + filterEditor; ?>
- +
- peekAhead() as $event): ?> - output; - $title = $event->type; - $stateName = 'invalid'; - $isService = isset($event->service_description); - switch ($event->type) { - case 'notify': - $icon = 'bell'; - $title = $this->translate('Notification'); - $msg = $msg ?: $this->translate('This notification was not sent out to any contact.'); - break; - case 'comment': - $icon = 'comment'; - $title = $this->translate('Comment'); - break; - case 'ack': - $icon = 'ok'; - $title = $this->translate('Acknowledgement'); - break; - case 'dt_comment': - $icon = 'plug'; - $title = $this->translate('In Downtime'); - break; - case 'flapping': - $icon = 'flapping'; - $title = $this->translate('Flapping'); - break; - case 'flapping_deleted': - $icon = 'ok'; - $title = $this->translate('Flapping Stopped'); - break; - case 'hard_state': - $icon = $isService ? 'service' : 'host'; - $stateName = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); - $title = $isService ? Service::getStateText($event->state, true) : Host::getStateText($event->state, true); - break; - case 'soft_state': - $icon = 'lightbulb'; - $stateName = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); - $title = $isService ? Service::getStateText($event->state, true) : Host::getStateText($event->state, true); - break; - case 'dt_start': - $icon = 'starttime'; - $title = $this->translate('Downtime Start'); - break; - case 'dt_end': - $icon = 'endtime'; - $title = $this->translate('Downtime End'); - break; - } - ?> - - - - + peekAhead() as $event): + $icon = 'help'; + $msg = $event->output; + $title = $event->type; + $stateName = 'invalid'; + $isService = isset($event->service_description); + switch ($event->type) { + case 'notify': + $icon = 'bell'; + $title = $this->translate('Notification'); + $msg = $msg ?: $this->translate('This notification was not sent out to any contact.'); + break; + case 'comment': + $icon = 'comment'; + $title = $this->translate('Comment'); + break; + case 'ack': + $icon = 'ok'; + $title = $this->translate('Acknowledgement'); + break; + case 'dt_comment': + $icon = 'plug'; + $title = $this->translate('In Downtime'); + break; + case 'flapping': + $icon = 'flapping'; + $title = $this->translate('Flapping'); + break; + case 'flapping_deleted': + $icon = 'ok'; + $title = $this->translate('Flapping Stopped'); + break; + case 'hard_state': + $icon = $isService ? 'service' : 'host'; + $stateName = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); + $title = $isService ? Service::getStateText($event->state, true) : Host::getStateText($event->state, true); + break; + case 'soft_state': + $icon = 'lightbulb'; + $stateName = $isService ? Service::getStateText($event->state) : Host::getStateText($event->state); + $title = $isService ? Service::getStateText($event->state, true) : Host::getStateText($event->state, true); + break; + case 'dt_start': + $icon = 'starttime'; + $title = $this->translate('Downtime Start'); + break; + case 'dt_end': + $icon = 'endtime'; + $title = $this->translate('Downtime End'); + break; + } ?> + + + + -
- getIteratorPosition() % $limit === 0): ?> - - - escape($title); ?> -

timeAgo($event->timestamp, $this->compact); ?>

-
- icon($icon, $title); ?> - - link()->service( - $event->service_description, $event->service_display_name, $event->host_name, $event->host_display_name, 'rowaction' - ) ?> - - link()->host($event->host_name, $event->host_display_name) ?> - -

- escape($msg) ?> -

-
+ getIteratorPosition() % $limit === 0): ?> + + + escape($title); ?> +

timeAgo($event->timestamp, $this->compact); ?>

+
+ icon($icon, $title); ?> + + link()->service( + $event->service_description, $event->service_display_name, $event->host_name, $event->host_display_name, 'rowaction' + ) ?> + + link()->host($event->host_name, $event->host_display_name) ?> + +

+ escape($msg) ?> +

+
+ hasResult()): ?> - translate('No history events found matching the filter'); ?> + translate('No history events found matching the filter'); ?> hasMore()): ?> - compact): ?> - qlink( - $this->translate('Show More'), - $url->without(array('view', 'limit')), - null, - array( - 'data-base-target' => '_next', - 'class' => 'pull-right action-link' - ) - ); ?> - - qlink( - $this->translate('Load More'), - $url->setAnchor('page-' . ($page + 1)), - array( - 'page' => $page + 1, - ), - array( - 'id' => 'load-more', - 'class' => 'pull-right action-link' - ) - ); ?> - +compact): ?> + qlink( + $this->translate('Show More'), + $url->without(array('view', 'limit')), + null, + array( + 'data-base-target' => '_next', + 'class' => 'pull-right action-link' + ) + ); ?> + + qlink( + $this->translate('Load More'), + $url->setAnchor('page-' . ($page + 1)), + array( + 'page' => $page + 1, + ), + array( + 'id' => 'load-more', + 'class' => 'pull-right action-link' + ) + ); ?> +