Fix grid styling and add links for hosts and service

refs #4601
This commit is contained in:
Jannis Moßhammer 2013-09-04 11:15:09 +02:00 committed by Eric Lippmann
parent d27e34cef8
commit e915119845
4 changed files with 28 additions and 7 deletions

View File

@ -61,7 +61,7 @@ class Monitoring_ShowController extends ActionController
// TODO: Do not allow wildcards in names!
if ($host !== null) {
// TODO: $this->assertPermission('host/read', $host);
if ($this->action_name !== 'host' && $service !== null && $service !== '*') {
if ($this->getRequest()->getActionName() !== 'host' && $service !== null && $service !== '*') {
// TODO: $this->assertPermission('service/read', $service);
$object = Service::fetch($this->backend, $host, $service);
} else {

View File

@ -12,7 +12,7 @@ $viewHelper = $this->getHelper('MonitoringState');
<thead>
<tr>
<th colspan="2">Status</th>
<th colspan="3">Status</th>
<th>Host</th>
<th>Output</th>
<th></th>

View File

@ -26,10 +26,17 @@ echo $this->paginationControl($notifications, null, null, array('preserve' => $t
<?php foreach ($notifications as $notification): ?>
<tr>
<td>
<?= $notification->host_name ?>
<a href="<?= $this->href('monitoring/show/host', array('host' => $notification->host_name)); ?>">
<?= $notification->host_name ?>
</a>
</td>
<td>
<?= empty($notification->service_description) ? '' : $notification->service_description; ?>
<a href="<?= $this->href('monitoring/show/host', array(
'host' => $notification->host_name,
'service' => $notification->service_description
)
); ?>">
<?= empty($notification->service_description) ? '' : $notification->service_description; ?>
</td>
<td><?= $formatter->getNotificationType($notification); ?>
</td>

View File

@ -87,8 +87,15 @@ $trimArea = $this->getHelper('Trim');
<i>{{COMMENT_ICON}}</i>
</a>
<?php endif; ?>
<b> <?= $service->service_display_name; ?></b>
<a href="<?= $this->href(
'monitoring/show/service',
array(
'host' => $service->host_name,
'service' => $service->service_description
)
); ?>">
<b> <?= $service->service_display_name; ?></b>
</a>
<br/>
<?php if ($service->service_action_url != ""): ?>
@ -102,7 +109,14 @@ $trimArea = $this->getHelper('Trim');
</td>
<td title="<?= $viewHelper->getStateTitle($service, 'host'); ?>">
<?= $service->host_name; ?>
<a href="<?= $this->href(
'monitoring/show/host',
array(
'host' => $service->host_name,
)
); ?>">
<?= $service->host_name; ?>
</a>
<div>
(<?= ucfirst($viewHelper->monitoringState($service, 'host')); ?>)