mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 15:24:05 +02:00
parent
18bd1c3221
commit
5d0eaa5cd3
@ -96,6 +96,7 @@ class Monitoring_ShowController extends ActionController
|
|||||||
public function hostAction()
|
public function hostAction()
|
||||||
{
|
{
|
||||||
$this->view->object->prefetch();
|
$this->view->object->prefetch();
|
||||||
|
$this->view->object->eventHistory = $this->view->object->eventHistory->limit(10)->fetchAll();
|
||||||
$this->view->preserve = array();
|
$this->view->preserve = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<td><?= date('d.m. H:i', $event->timestamp); ?></td>
|
<td><?= date('d.m. H:i', $event->timestamp); ?></td>
|
||||||
|
|
||||||
<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(
|
<a href="<?= $this->href('monitoring/show/service', array(
|
||||||
'host' => $object->host_name,
|
'host' => $object->host_name,
|
||||||
'service' => $event->service_description
|
'service' => $event->service_description
|
||||||
@ -84,6 +84,20 @@
|
|||||||
<? endforeach; ?>
|
<? endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -15,3 +15,5 @@
|
|||||||
<?= $this->render('show/components/flags.phtml'); ?>
|
<?= $this->render('show/components/flags.phtml'); ?>
|
||||||
|
|
||||||
<?= $this->render('show/components/perfdata.phtml'); ?>
|
<?= $this->render('show/components/perfdata.phtml'); ?>
|
||||||
|
|
||||||
|
<?= $this->render('show/components/eventHistory.phtml'); ?>
|
||||||
|
@ -158,7 +158,6 @@ abstract class AbstractObject
|
|||||||
'type'
|
'type'
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
// echo $this->foreign['eventHistory']->dump();die;
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,8 @@ class Host extends AbstractObject
|
|||||||
->fetchContacts()
|
->fetchContacts()
|
||||||
->fetchContactgroups()
|
->fetchContactgroups()
|
||||||
->fetchCustomvars()
|
->fetchCustomvars()
|
||||||
->fetchComments();
|
->fetchComments()
|
||||||
|
->fetchEventHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function fetchObject()
|
protected function fetchObject()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user