42 lines
1.8 KiB
PHTML
42 lines
1.8 KiB
PHTML
<?php
|
|
|
|
use Icinga\Module\Monitoring\Object\Host;
|
|
use Icinga\Module\Monitoring\Object\Service;
|
|
|
|
?>
|
|
<?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>
|
|
<tr class="state <?= Service::getStateText($object->service_state); ?><?= $object->service_handled ? ' handled' : ''; ?>">
|
|
<td class="state">
|
|
<strong><?= Service::getStateText($object->service_state, true); ?></strong><br>
|
|
<?= $this->prefixedTimeSince($object->service_last_state_change, true); ?>
|
|
</td>
|
|
<td>
|
|
<strong><?= $this->translate('Service'); ?>: <?= $this->escape($object->service_display_name); ?></strong>
|
|
<?php if ($object->service_display_name !== $object->service_description): ?>
|
|
<small>(<?= $this->escape($object->service_description); ?>)</small>
|
|
<?php endif ?>
|
|
<?= $this->render('partials/service/statusicons.phtml'); ?>
|
|
</td>
|
|
</tr>
|
|
</table>
|