service_description;
$params = array(
'host' => $object->host_name,
'service' => $object->service_description
);
} else {
$title = $object->host_name;
$params = array('host' => $object->host_name);
}
// TODO: Remove this once we have better helpers
$states = array(
'service' => array(
'ok',
'warning',
'critical',
'unknown',
99 => 'pending',
),
'host' => array(
'up',
'down',
'unreachable',
99 => 'pending',
)
);
?>
= $this->render('show/components/header.phtml') ?>
= $this->translate("This object's event history") ?>
= $this->paginationControl($this->history, null, null, array('preserve' => $this->preserve)); ?>
history->count() === 0): ?>
= $this->translate('No History Available For This Object') ?>
history as $event):
if (array_key_exists($event->state, $states[$event->object_type])) {
$state_class = $states[$event->object_type][$event->state];
} else {
$state_class = 'invalid';
}
switch ($event->type) {
case 'notify':
$icon = 'notification';
$title = $this->translate('Notification');
$state = $this->translate('ACK');
break;
case 'comment':
$icon = 'comment';
$title = $this->translate('Comment');
break;
case 'comment_deleted':
$icon = 'remove';
$title = $this->translate('Comment deleted');
break;
case 'ack':
$icon = 'acknowledgement';
$title = $this->translate('Acknowledge');
break;
case 'ack_deleted':
$icon = 'remove';
$title = $this->translate('Ack removed');
break;
case 'dt_comment':
$icon = 'in_downtime';
$title = $this->translate('In Downtime');
break;
case 'dt_comment_deleted':
$icon = 'remove';
$title = $this->translate('Downtime removed');
break;
case 'flapping':
$icon = 'flapping';
$title = $this->translate('Flapping');
break;
case 'flapping_deleted':
$icon = 'remove';
$title = $this->translate('Flapping stopped');
break;
case 'hard_state':
$icon = 'submit';
$title = $this->translate('Hard State');
break;
case 'soft_state':
$icon = 'softstate';
$title = $this->translate('Soft State');
$state_class .= ' handled';
break;
case 'dt_start':
$icon = 'downtime_start';
$title = $this->translate('Downtime Start');
break;
case 'dt_end':
$icon = 'downtime_end';
$title = $this->translate('Downtime End');
break;
}
?>
= $this->timeSince($event->timestamp) ?> = $this->escape($title) ?> |
tickets ? preg_replace_callback(
$this->tickets->getPattern(),
array($this->tickets, 'createLink'),
$this->escape($event->output)
) : $this->escape($event->output);
echo $this->icon($icon . '.png', $title) . ' ';
if ($object instanceof Host): ?>
= $this->escape($event->service_description) ?>
= $this->escape($event->service_description) ?> on = $this->escape($event->host_name) ?>
attempt !== null) {
printf('[ %d/%d ] ', $event->attempt, $event->max_attempts);
}
echo $output;
?>
|
endforeach; ?>