monitoring: Rename $showService to $isService in the header view script

Most views use $isService to set whether we are about to show a service.
This commit is contained in:
Eric Lippmann 2015-01-21 17:29:31 +01:00
parent 6be0224d9d
commit d064b0ac79

View File

@ -3,7 +3,7 @@
use Icinga\Module\Monitoring\Object\Host;
use Icinga\Module\Monitoring\Object\Service;
$showService = $object->getType() === $object::TYPE_SERVICE;
$isService = $object->getType() === $object::TYPE_SERVICE;
?>
<?php if (!$this->compact): ?>
@ -11,7 +11,7 @@ $showService = $object->getType() === $object::TYPE_SERVICE;
<?php endif ?>
<table class="objectstate">
<tr class="state <?= Host::getStateText($object->host_state); ?><?= $object->host_handled ? ' handled' : '' ?>">
<td class="state"<?= $showService ? '' : ' rowspan="2"' ?>>
<td class="state"<?= $isService ? '' : ' rowspan="2"' ?>>
<strong><?= strtoupper(Host::getStateText($object->host_state, true)); ?></strong><br />
<?= $this->prefixedTimeSince($object->host_last_state_change, true) ?>
</td>
@ -21,7 +21,7 @@ $showService = $object->getType() === $object::TYPE_SERVICE;
<?php endif ?>
</td>
</tr>
<?php if ($showService): ?>
<?php if ($isService): ?>
<tr class="state <?= Service::getStateText($object->service_state); ?><?= $object->service_handled ? ' handled' : '' ?>">
<td class="state">
<strong><?= strtoupper(Service::getStateText($object->service_state, true)); ?></strong><br />