From 51909ce60ca62ad77e098dc0d5e69dfd7aad3cf4 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Wed, 23 Oct 2013 10:45:13 +0200 Subject: [PATCH] Change the state indicator of the eventhistory view to match the other views --- .../views/scripts/list/eventhistory.phtml | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/eventhistory.phtml b/modules/monitoring/application/views/scripts/list/eventhistory.phtml index 757358009..8e5c96d32 100644 --- a/modules/monitoring/application/views/scripts/list/eventhistory.phtml +++ b/modules/monitoring/application/views/scripts/list/eventhistory.phtml @@ -24,9 +24,68 @@ + switch ($event->type) { + case 'notify': + $icon = 'notification'; + $title = 'Notification'; + $msg = $event->output; + break; + case 'comment': + $icon = 'comment'; + $title = 'Comment'; + $msg = $event->output; + break; + case 'ack': + $icon = 'acknowledgement'; + $title = 'Acknowledgement'; + $msg = $event->output; + break; + case 'dt_comment': + $icon = 'in-downtime'; + $title = 'In Downtime'; + $msg = $event->output; + break; + case 'flapping': + $icon = 'flapping'; + $title = 'Flapping'; + $msg = $event->output; + break; + case 'hard_state': + $icon = '{{HARDSTATE_ICON}}'; + $title = 'Hard State'; + $msg = $event->output . '
Attempt ' . $event->attempt . '/' . $event->max_attempts . ' (Hard)'; + $class = 'border-status-' . ( + $isService ? + strtolower($this->util()->getServiceStateName($event->state)) : + strtolower($this->util()->getHostStateName($event->state)) + ); + break; + case 'soft_state': + $icon = '{{SOFTSTATE_ICON}}'; + $title = 'Soft State'; + $msg = $event->output . '
Attempt ' . $event->attempt . '/' . $event->max_attempts . ' (Soft)'; + $class = 'border-status-' . ( + $isService ? + strtolower($this->util()->getServiceStateName($event->state)) : + strtolower($this->util()->getHostStateName($event->state)) + ); + break; + case 'dt_start': + $icon = 'downtime-start'; + $title = 'Downtime Start'; + $msg = $event->output; + break; + case 'dt_end': + $icon = 'downtime-end'; + $title = 'Downtime End'; + $msg = $event->output; + break; + } + ?> - timestamp); ?> + "> + timestamp); ?> + service)): ?> "> +