monitoring: Display soft states in the service detail view

refs #5543
This commit is contained in:
Eric Lippmann 2015-10-28 12:09:00 +01:00
parent b325c4769a
commit 8212ff9aab
1 changed files with 12 additions and 2 deletions

View File

@ -7,7 +7,12 @@ use Icinga\Module\Monitoring\Object\Service;
<tr>
<td class="state-col state-<?= Host::getStateText($object->host_state) ?><?= $object->host_handled ? ' handled' : '' ?>">
<div class="state-label"><?= Host::getStateText($object->host_state, true) ?></div>
<div class="state-meta"><?= $this->timeSince($object->host_last_state_change) ?></div>
<div class="state-meta">
<?= $this->timeSince($object->host_last_state_change) ?>
<?php if ((int) $object->host_state > 0 && (int) $object->host_state_type === 0): ?>
<div><?= $this->translate('Soft', 'Soft state') ?> <?= $object->host_attempt ?></div>
<?php endif ?>
</div>
</td>
<td>
<?= $this->iconImage()->host($object) ?>
@ -31,7 +36,12 @@ use Icinga\Module\Monitoring\Object\Service;
<tr>
<td class="state-col state-<?= Service::getStateText($object->service_state) ?><?= $object->service_handled ? ' handled' : '' ?>">
<div class="state-label"><?= Service::getStateText($object->service_state, true) ?></div>
<div class="state-meta"><?= $this->timeSince($object->service_last_state_change) ?></div>
<div class="state-meta">
<?= $this->timeSince($object->service_last_state_change) ?>
<?php if ((int) $object->service_state > 0 && (int) $object->service_state_type === 0): ?>
<div><?= $this->translate('Soft', 'Soft state') ?> <?= $object->service_attempt ?></div>
<?php endif ?>
</div>
</td>
<td>
<?= $this->iconImage()->service($object) ?>