Change the state indicator of the eventhistory view to match the other views

This commit is contained in:
Matthias Jentsch 2013-10-23 10:45:13 +02:00
parent dc5182d4bf
commit 51909ce60c

View File

@ -24,30 +24,6 @@
<?php
$class = null;
$isService = false;
?>
<tr>
<td><?= date('d.m. H:i', $event->timestamp); ?></td>
<td>
<?php if (isset($event->service)): ?>
<a href="<?= $this->href('monitoring/show/service', array(
'host' => $event->host,
'service' => $event->service
)); ?>">
<?= $event->service ?>
</a>
<small>
on <?= $event->host ?>
</small>
<?php $isService = true; ?>
<?php else: ?>
<a href="<?= $this->href('monitoring/show/host', array(
'host' => $event->host
)); ?>">
<?= $event->host ?>
</a>
<?php endif; ?>
<br />
<?php
switch ($event->type) {
case 'notify':
$icon = 'notification';
@ -106,7 +82,31 @@
break;
}
?>
<div<?php if (!empty($class)): ?> class="<?= $class ?>"<?php endif; ?>>
<tr>
<td <?= !empty($class) ? 'class="' . $class . '"' : '' ?>">
<?= date('d.m. H:i', $event->timestamp); ?>
</td>
<td>
<?php if (isset($event->service)): ?>
<a href="<?= $this->href('monitoring/show/service', array(
'host' => $event->host,
'service' => $event->service
)); ?>">
<?= $event->service ?>
</a>
<small>
on <?= $event->host ?>
</small>
<?php $isService = true; ?>
<?php else: ?>
<a href="<?= $this->href('monitoring/show/host', array(
'host' => $event->host
)); ?>">
<?= $event->host ?>
</a>
<?php endif; ?>
<br />
<div>
<i title="<?= $title ?>" class="icinga-icon-<?= $icon ?>"></i>
<?php if (!empty($msg)) { echo $msg; } ?>
</div>