From 4821c6e3e595dd4b8676e135493910350adbab36 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 20 Jun 2014 14:02:03 +0200 Subject: [PATCH] monitoring/show/history: use limiter, nicer output --- .../application/views/scripts/show/history.phtml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/history.phtml b/modules/monitoring/application/views/scripts/show/history.phtml index 446ce7760..5392ebf13 100644 --- a/modules/monitoring/application/views/scripts/show/history.phtml +++ b/modules/monitoring/application/views/scripts/show/history.phtml @@ -34,6 +34,7 @@ $states = array( ?>
render('show/components/header.phtml') ?>

translate("This object's event history") ?>

+widget('limiter', array('url' => $this->url, 'max' => $this->history->count())) ?> paginationControl($this->history, null, null, array('preserve' => $this->preserve)); ?>
@@ -52,7 +53,7 @@ if (array_key_exists($event->state, $states[$event->object_type])) { } else { $state_class = 'invalid'; } - +$extraTitle = false; switch ($event->type) { case 'notify': $icon = 'notification'; @@ -93,11 +94,12 @@ switch ($event->type) { break; case 'hard_state': $icon = 'submit'; - $title = $this->translate('Hard State'); + $title = strtoupper($state_class); break; case 'soft_state': $icon = 'softstate'; - $title = $this->translate('Soft State'); + $title = strtoupper($state_class); + $extraTitle = $this->translate('Soft State'); $state_class .= ' handled'; break; case 'dt_start': @@ -114,7 +116,7 @@ switch ($event->type) { ?> - timeSince($event->timestamp) ?>
escape($title) ?> + escape($title) ?>
prefixedTimeSince($event->timestamp) ?>' . $this->escape($extraTitle) ?>