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

34 lines
976 B
PHTML

<?php $showService = $object->service_description && $tabs->getActiveName() !== 'host' ?>
<?php if (! $compact): ?>
<?= $tabs->render($this) ?>
<?php endif ?>
<table class="table">
<tr>
<td>
{{HOST_ICON}} <b><?= $this->escape($object->host_name) ?>
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
(<?= $this->escape($object->host_address) ?>)
<?php endif ?>
</b>
</td>
<td>
<?= $this->util()->getHostStateName($object->host_state) ?>
<br/>
since <?= $this->timeSince($object->host_last_state_change) ?>
</td>
</tr>
<?php if ($showService): ?>
<tr>
<td>
{{SERVICE_ICON}} <b>Service: <?= $this->escape($object->service_description) ?></b>
</td>
<td>
<?= $this->util()->getServiceStateName($object->service_state); ?>
<br/>
since <?= $this->timeSince($object->service_last_state_change) ?>
</td>
</tr>
<?php endif; ?>
</table>