monitoring: Fix wrong partial time when a downtime expires

This commit is contained in:
Eric Lippmann 2015-05-22 16:50:24 +02:00
parent b0f7773260
commit 1d22d0c989
3 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ if (count($downtimes) === 0) {
<td class="state">
<strong><?= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?></strong>
<br>
<?= $downtime->is_in_effect ? $this->timeSince($downtime->start, $this->compact) : $this->timeUntil($downtime->start, $this->compact) ?>
<?= $this->timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?>
</td>
<td>
<?php

View File

@ -3,7 +3,7 @@
<td class="state">
<strong><?= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?></strong>
<br>
<?= $downtime->is_in_effect ? $this->timeSince($downtime->start, $this->compact) : $this->timeUntil($downtime->start, $this->compact) ?>
<?= $this->timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?>
</td>
<td>
<small>

View File

@ -8,7 +8,7 @@
<td class="state">
<strong><?= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?></strong>
<br>
<?= $downtime->is_in_effect ? $this->timeSince($downtime->start, $this->compact) : $this->timeUntil($downtime->start, $this->compact) ?>
<?= $this->timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?>
</td>
<td class="name oneline">
<?php if ($downtime->isService): ?>