icingaweb2/modules/monitoring/application/views/scripts/show/components/header.phtml

29 lines
1.2 KiB
PHTML
Raw Normal View History

<?php $showService = $object->service_description && $tabs->getActiveName() !== 'host' ?>
2014-03-06 14:20:34 +01:00
<?php if (!$this->compact): ?>
<?= $tabs ?>
<?php endif ?>
2014-03-06 14:20:34 +01:00
<table class="objectstate">
<tr class="state <?= $this->monitoringState($object, 'host') ?><?= $object->host_handled ? ' handled' : '' ?>">
<td class="state"<?= $showService ? '' : ' rowspan="2"' ?>>
<?= $this->util()->getHostStateName($object->host_state) ?><br />
2013-07-12 14:33:17 +02:00
since <?= $this->timeSince($object->host_last_state_change) ?>
</td>
2014-03-06 14:20:34 +01:00
<td><b><?= $this->escape($object->host_name) ?></b><?php
if ($object->host_address && $object->host_address !== $object->host_name): ?>
<br><?= $this->escape($object->host_address) ?></br>
<?php endif ?>
</td>
2013-07-12 14:33:17 +02:00
</tr>
<?php if ($showService): ?>
2014-03-06 14:20:34 +01:00
<tr class="state <?= $this->monitoringState($object, 'service') ?><?= $object->service_handled ? ' handled' : '' ?>">
<td class="state">
<?= $this->util()->getServiceStateName($object->service_state); ?><br />
2013-07-12 14:33:17 +02:00
since <?= $this->timeSince($object->service_last_state_change) ?>
</td>
2014-03-06 14:20:34 +01:00
<td><b>Service: <?= $this->escape($object->service_description) ?></b></td>
2013-07-12 14:33:17 +02:00
</tr>
2014-03-06 14:20:34 +01:00
<?php else: ?>
<tr><td><!--<b>Host state</b>-->&nbsp;</td></tr>
<?php endif ?>
2013-07-12 14:33:17 +02:00
</table>