diff --git a/modules/monitoring/application/views/scripts/list/eventhistory.phtml b/modules/monitoring/application/views/scripts/list/eventhistory.phtml index cddad22fd8..8d47ee41aa 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' + ) + ); ?> +