parent
18bd1c3221
commit
5d0eaa5cd3
|
@ -96,6 +96,7 @@ class Monitoring_ShowController extends ActionController
|
|||
public function hostAction()
|
||||
{
|
||||
$this->view->object->prefetch();
|
||||
$this->view->object->eventHistory = $this->view->object->eventHistory->limit(10)->fetchAll();
|
||||
$this->view->preserve = array();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<td><?= date('d.m. H:i', $event->timestamp); ?></td>
|
||||
|
||||
<td>
|
||||
<?php if (!$object instanceof Icinga\Module\Monitoring\Object\Service): ?>
|
||||
<?php if ($object instanceof Icinga\Module\Monitoring\Object\Service): ?>
|
||||
<a href="<?= $this->href('monitoring/show/service', array(
|
||||
'host' => $object->host_name,
|
||||
'service' => $event->service_description
|
||||
|
@ -84,6 +84,20 @@
|
|||
<? endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ($object instanceof Icinga\Module\Monitoring\Object\Service): ?>
|
||||
<a href="<?= $this->href('monitoring/list/eventhistory', array(
|
||||
'host' => $object->host_name,
|
||||
'service' => $object->service_description
|
||||
)); ?>">
|
||||
All events for <?= $event->service_description ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->href('monitoring/list/eventhistory', array(
|
||||
'host' => $object->host_name
|
||||
)); ?>">
|
||||
All events for <?= $event->host_name ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -15,3 +15,5 @@
|
|||
<?= $this->render('show/components/flags.phtml'); ?>
|
||||
|
||||
<?= $this->render('show/components/perfdata.phtml'); ?>
|
||||
|
||||
<?= $this->render('show/components/eventHistory.phtml'); ?>
|
||||
|
|
|
@ -158,7 +158,6 @@ abstract class AbstractObject
|
|||
'type'
|
||||
))
|
||||
);
|
||||
// echo $this->foreign['eventHistory']->dump();die;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ class Host extends AbstractObject
|
|||
->fetchContacts()
|
||||
->fetchContactgroups()
|
||||
->fetchCustomvars()
|
||||
->fetchComments();
|
||||
->fetchComments()
|
||||
->fetchEventHistory();
|
||||
}
|
||||
|
||||
protected function fetchObject()
|
||||
|
|
Loading…
Reference in New Issue