From aa7adee21f4c97661b83140f57ba5ff40d7f18d2 Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Wed, 5 Aug 2015 14:37:33 +0200 Subject: [PATCH] views/donwtime(s|-header): Fix that the Downtimes show "Starts in" ... ... for objects with non-problem state refs #9266 --- .../application/views/scripts/list/downtimes.phtml | 6 ++++++ .../scripts/partials/downtime/downtime-header.phtml | 12 +++++++++--- .../scripts/partials/downtime/downtimes-header.phtml | 6 ++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml index 7848efcd8..6a231b785 100644 --- a/modules/monitoring/application/views/scripts/list/downtimes.phtml +++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml @@ -35,9 +35,15 @@ if (! $this->compact): ?> ?> + start <= time() && ! $downtime->is_in_effect): ?> + translate('Started'); ?> +
+ Ends timeUntil($downtime->end, $this->compact) ?> + is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?>
timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?> + diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml index 85bd06b5c..c80f8d473 100644 --- a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml @@ -1,9 +1,15 @@
- is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?> -
- timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?> + start <= time() && ! $downtime->is_in_effect): ?> + translate('Started'); ?> +
+ Ends timeUntil($downtime->end, $this->compact) ?> + + is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?> +
+ 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 2e657d63c..390a9954a 100644 --- a/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml @@ -6,9 +6,15 @@ } ?>
+ start <= time() && ! $downtime->is_in_effect): ?> + translate('Started'); ?> +
+ Ends timeUntil($downtime->end, $this->compact) ?> + is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?>
timeUntil($downtime->is_in_effect ? $downtime->end : $downtime->start, $this->compact) ?> +
isService): ?>