icingaweb2/modules/monitoring/application/views/scripts/partials/object/host-header.phtml

30 lines
1.0 KiB
PHTML

<?php
use Icinga\Module\Monitoring\Object\Host;
/** @var Host $object */
?>
<table>
<tr>
<td class="state-col state-<?= Host::getStateText($object->host_state) ?><?= $object->host_handled ? ' handled' : '' ?>">
<p>
<?= Host::getStateText($object->host_state, true) ?>
<br>
<?= $this->timeSince($object->host_last_state_change) ?>
</p>
</td>
<td>
<p>
<?= $this->iconImage()->host($object) ?>
<?= $this->escape($object->host_display_name) ?>
<?php if ($object->host_display_name !== $object->host_name): ?>
(<?= $this->escape($object->host_name) ?>)
<?php endif ?>
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
<br>
<?= $this->escape($object->host_address) ?>
<?php endif ?>
<?= $this->render('partials/host/statusicons.phtml') ?>
</p>
</td>
</tr>
</table>