monitoring: Fix coding style in components/header.phtml

This commit is contained in:
Eric Lippmann 2015-01-22 10:24:44 +01:00
parent d064b0ac79
commit 98acc9166a
1 changed files with 23 additions and 23 deletions

View File

@ -6,34 +6,34 @@ use Icinga\Module\Monitoring\Object\Service;
$isService = $object->getType() === $object::TYPE_SERVICE; $isService = $object->getType() === $object::TYPE_SERVICE;
?> ?>
<?php if (!$this->compact): ?>
<?php if (! $this->compact): ?>
<?= $tabs ?> <?= $tabs ?>
<?php endif ?> <?php endif ?>
<table class="objectstate"> <table class="objectstate">
<tr class="state <?= Host::getStateText($object->host_state); ?><?= $object->host_handled ? ' handled' : '' ?>"> <tr class="state <?= Host::getStateText($object->host_state); ?><?= $object->host_handled ? ' handled' : '' ?>">
<td class="state"<?= $isService ? '' : ' rowspan="2"' ?>> <td class="state"<?= $isService ? '' : ' rowspan="2"' ?>>
<strong><?= strtoupper(Host::getStateText($object->host_state, true)); ?></strong><br /> <strong><?= strtoupper(Host::getStateText($object->host_state, true)); ?></strong><br />
<?= $this->prefixedTimeSince($object->host_last_state_change, true) ?> <?= $this->prefixedTimeSince($object->host_last_state_change, true) ?>
</td> </td>
<td><b><?= $this->escape($object->host_name) ?></b><?php <td>
if ($object->host_address && $object->host_address !== $object->host_name): ?> <b><?= $this->escape($object->host_name) ?></b>
<br><?= $this->escape($object->host_address) ?> <?php if ($object->host_address && $object->host_address !== $object->host_name): ?>
<?php endif ?> <br><?= $this->escape($object->host_address) ?>
</td> <?php endif ?>
</tr> </td>
</tr>
<?php if ($isService): ?> <?php if ($isService): ?>
<tr class="state <?= Service::getStateText($object->service_state); ?><?= $object->service_handled ? ' handled' : '' ?>"> <tr class="state <?= Service::getStateText($object->service_state); ?><?= $object->service_handled ? ' handled' : '' ?>">
<td class="state"> <td class="state">
<strong><?= strtoupper(Service::getStateText($object->service_state, true)); ?></strong><br /> <strong><?= strtoupper(Service::getStateText($object->service_state, true)); ?></strong><br />
<?= $this->prefixedTimeSince($object->service_last_state_change, true) ?> <?= $this->prefixedTimeSince($object->service_last_state_change, true) ?>
</td> </td>
<td><b><?= $this->translate('Service') ?>: <?= $this->escape($object->service_description) ?></b> <td>
<b><?= $this->translate('Service') ?>: <?= $this->escape($object->service_description) ?></b>
<?= $this->render('show/components/statusIcons.phtml') ?> <?= $this->render('show/components/statusIcons.phtml') ?>
</td>
</td>
</tr> </tr>
<?php else: ?>
<tr><td><!--<b>Host state</b>-->&nbsp;</td></tr>
<?php endif ?> <?php endif ?>
</table> </table>