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

28 lines
1.3 KiB
PHTML

<?php
use Icinga\Module\Monitoring\Object\Host;
?>
<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->timeSince($object->host_last_state_change); ?>
</td>
<td>
<?= $this->iconImage()->host($object) ?>
<strong class="selectable"><?= $this->escape($object->host_display_name); ?></strong>
<?php if ($object->host_display_name !== $object->host_name): ?>
<small class="selectable">(<?= $this->escape($object->host_name); ?>)</small>
<?php endif ?>
<?= $this->render('partials/host/statusicons.phtml'); ?>
<br/>
<?php if ($object->host_address6 && $object->host_address6 !== $object->host_name): ?>
<span class="selectable" title="IPv6 address"><?= $this->escape($object->host_address6); ?></span>
<?php endif ?>
<?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
<span class="selectable" title="IPv4 address"><?= $this->escape($object->host_address); ?></span>
<?php endif ?>
</td>
</tr>
</table>