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

27 lines
1.0 KiB
PHTML

<?php
use Icinga\Module\Monitoring\Object\Host;
?>
<?php if (! $this->compact): ?>
<?= $tabs; ?>
<?php endif ?>
<table class="objectstate">
<tr class="state <?= Host::getStateText($object->host_state); ?><?= $object->host_handled ? ' handled' : ''; ?>">
<td class="state">
<strong><?= Host::getStateText($object->host_state, true); ?></strong><br>
<?= $this->prefixedTimeSince($object->host_last_state_change, true); ?>
</td>
<td>
<strong><?= $this->escape($object->host_display_name); ?></strong>
<?php if ($object->host_display_name !== $object->host_name): ?>
<small>(<?= $this->escape($object->host_name); ?>)</small>
<?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'); ?>
</td>
</tr>
</table>