From 037bcc4b3e922fd72de5f0284660b6b8d2f54047 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 11 Jul 2019 14:20:32 +0200 Subject: [PATCH] Don't show flexible twice for not yet started flexible downtimes --- .../views/scripts/show/components/downtime.phtml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 7d4d18835..d124e09ff 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -61,18 +61,10 @@ if (empty($object->comments) && ! $addLink) { $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, false, true) ); } else { - if ((bool) $downtime->is_fixed) { - $state = sprintf( - $this->translate('scheduled %s', 'Last format parameter represents the time scheduled'), - $this->timeUntil($downtime->start, false, true) - ); - } else { - $state = sprintf( - $this->translate('scheduled flexible %s', 'Last format parameter represents the time scheduled'), - $this->timeUntil($downtime->start, false, true) - ); - } - $state .= ' ' . sprintf( + $state = sprintf( + $this->translate('scheduled %s', 'Last format parameter represents the time scheduled'), + $this->timeUntil($downtime->start, false, true) + ) . ' ' . sprintf( $this->translate('expires %s', 'Last format parameter represents the downtime expire time'), $this->timeUntil($downtime->is_flexible ? $downtime->scheduled_end : $downtime->end, false, true) );