Transfer changes from show/history.phtml to service/history.phtml
Was not recognised by git as host/history.phtml is the counterpart for show/history.phtml in the tree. refs #9009
This commit is contained in:
parent
670d6e93c7
commit
95cb6dea4b
|
@ -43,79 +43,68 @@ function contactsLink($match, $view) {
|
|||
<?php foreach ($history as $event): ?>
|
||||
<?php
|
||||
$stateClass = 'invalid';
|
||||
$msg = $this->escape($event->output);
|
||||
switch ($event->type) {
|
||||
case 'notify':
|
||||
$icon = 'notification';
|
||||
$title = $this->translate('Notification');
|
||||
$stateClass = Service::getStateText($event->state);
|
||||
|
||||
$msg = preg_replace_callback(
|
||||
$msg = $msg ? preg_replace_callback(
|
||||
'/^\[([^\]]+)\]/',
|
||||
function($match) use ($self) { return contactsLink($match, $self); },
|
||||
$this->escape($event->output)
|
||||
);
|
||||
$msg
|
||||
) : $this->translate('This notification was not sent out to any contact.');
|
||||
break;
|
||||
case 'comment':
|
||||
$icon = 'comment';
|
||||
$title = $this->translate('Comment');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
case 'comment_deleted':
|
||||
$icon = 'remove';
|
||||
$title = $this->translate('Comment deleted');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
case 'ack':
|
||||
$icon = 'acknowledgement';
|
||||
$title = $this->translate('Acknowledge');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
case 'ack_deleted':
|
||||
$icon = 'remove';
|
||||
$title = $this->translate('Ack removed');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
case 'dt_comment':
|
||||
$icon = 'in_downtime';
|
||||
$title = $this->translate('In Downtime');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
case 'dt_comment_deleted':
|
||||
$icon = 'remove';
|
||||
$title = $this->translate('Downtime removed');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
case 'flapping':
|
||||
$icon = 'flapping';
|
||||
$title = $this->translate('Flapping');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
case 'flapping_deleted':
|
||||
$icon = 'remove';
|
||||
$title = $this->translate('Flapping stopped');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
case 'hard_state':
|
||||
$msg = '[ ' . $event->attempt . '/' . $event->max_attempts . ' ] ' . $this->escape($event->output);
|
||||
$stateClass = Service::getStateText($event->state);
|
||||
$icon = 'attention-alt';
|
||||
$title = Service::getStateText($event->state);
|
||||
break;
|
||||
case 'soft_state':
|
||||
$icon = 'spinner';
|
||||
$msg = '[ ' . $event->attempt . '/' . $event->max_attempts . ' ] ' . $this->escape($event->output);
|
||||
$stateClass = Service::getStateText($event->state);
|
||||
$title = Service::getStateText($event->state);
|
||||
break;
|
||||
case 'dt_start':
|
||||
$icon = 'downtime_start';
|
||||
$title = $this->translate('Downtime Start');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
case 'dt_end':
|
||||
$icon = 'downtime_end';
|
||||
$title = $this->translate('Downtime End');
|
||||
$msg = $this->escape($event->output);
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue