Don't show last status change for services if they're in state pending

This commit is contained in:
Eric Lippmann 2015-04-10 15:31:20 +02:00
parent 2854859a67
commit 19cae4b751
1 changed files with 9 additions and 6 deletions

View File

@ -56,12 +56,15 @@ foreach ($services as $service):
?>
<tr class="state <?= $serviceStateName ?><?= $service->service_handled ? ' handled' : '' ?>">
<td class="state">
<strong><?= Service::getStateText($service->service_state, true); ?></strong><br />
<?= $this->timeSince($service->service_last_state_change) ?>
<?php if ($service->service_state > 0 && (int) $service->service_state_type === 0): ?>
<br />
<strong>Soft <?= $service->service_attempt ?></strong>
<?php endif ?>
<strong><?= Service::getStateText($service->service_state, true); ?></strong>
<?php if ((int) $service->service_state !== 99): ?>
<br />
<?= $this->timeSince($service->service_last_state_change) ?>
<?php if ((int) $service->service_state > 0 && (int) $service->service_state_type === 0): ?>
<br />
<strong>Soft <?= $service->service_attempt ?></strong>
<?php endif ?>
<?php endif ?>
</td>
<td>