From 1d22d0c9899053be8c453eb7ac76960847db78aa Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 22 May 2015 16:50:24 +0200 Subject: [PATCH] monitoring: Fix wrong partial time when a downtime expires --- .../monitoring/application/views/scripts/list/downtimes.phtml | 2 +- .../views/scripts/partials/downtime/downtime-header.phtml | 2 +- .../views/scripts/partials/downtime/downtimes-header.phtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml index ffcb7f335..d062274e7 100644 --- a/modules/monitoring/application/views/scripts/list/downtimes.phtml +++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml @@ -45,7 +45,7 @@ if (count($downtimes) === 0) { is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?>
- is_in_effect ? $this->timeSince($downtime->start, $this->compact) : $this->timeUntil($downtime->start, $this->compact) ?> + timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?> is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?>
- is_in_effect ? $this->timeSince($downtime->start, $this->compact) : $this->timeUntil($downtime->start, $this->compact) ?> + timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?> diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml index 074f342b4..d3dc665a9 100644 --- a/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml @@ -8,7 +8,7 @@ is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?>
- is_in_effect ? $this->timeSince($downtime->start, $this->compact) : $this->timeUntil($downtime->start, $this->compact) ?> + timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?> isService): ?>