diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php
index 6b2ff3d98..79b6d6c6e 100644
--- a/modules/monitoring/application/controllers/ShowController.php
+++ b/modules/monitoring/application/controllers/ShowController.php
@@ -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();
}
diff --git a/modules/monitoring/application/views/scripts/show/components/eventHistory.phtml b/modules/monitoring/application/views/scripts/show/components/eventHistory.phtml
index fd2eded86..fa806a27e 100644
--- a/modules/monitoring/application/views/scripts/show/components/eventHistory.phtml
+++ b/modules/monitoring/application/views/scripts/show/components/eventHistory.phtml
@@ -11,7 +11,7 @@
= date('d.m. H:i', $event->timestamp); ?> |
-
+
href('monitoring/list/eventhistory', array(
+ 'host' => $object->host_name,
+ 'service' => $object->service_description
+ )); ?>">
+ All events for = $event->service_description ?>
+
+
+
+ All events for = $event->host_name ?>
+
+
diff --git a/modules/monitoring/application/views/scripts/show/host.phtml b/modules/monitoring/application/views/scripts/show/host.phtml
index 06a02819b..3632e7264 100644
--- a/modules/monitoring/application/views/scripts/show/host.phtml
+++ b/modules/monitoring/application/views/scripts/show/host.phtml
@@ -15,3 +15,5 @@
= $this->render('show/components/flags.phtml'); ?>
= $this->render('show/components/perfdata.phtml'); ?>
+
+= $this->render('show/components/eventHistory.phtml'); ?>
diff --git a/modules/monitoring/library/Monitoring/Object/AbstractObject.php b/modules/monitoring/library/Monitoring/Object/AbstractObject.php
index 0dce487c1..408a99029 100644
--- a/modules/monitoring/library/Monitoring/Object/AbstractObject.php
+++ b/modules/monitoring/library/Monitoring/Object/AbstractObject.php
@@ -158,7 +158,6 @@ abstract class AbstractObject
'type'
))
);
- // echo $this->foreign['eventHistory']->dump();die;
return $this;
}
}
diff --git a/modules/monitoring/library/Monitoring/Object/Host.php b/modules/monitoring/library/Monitoring/Object/Host.php
index a3900439d..c73d27442 100644
--- a/modules/monitoring/library/Monitoring/Object/Host.php
+++ b/modules/monitoring/library/Monitoring/Object/Host.php
@@ -30,7 +30,8 @@ class Host extends AbstractObject
->fetchContacts()
->fetchContactgroups()
->fetchCustomvars()
- ->fetchComments();
+ ->fetchComments()
+ ->fetchEventHistory();
}
protected function fetchObject()
|