diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml
index 1ff615094..b588af952 100644
--- a/modules/monitoring/application/views/scripts/list/downtimes.phtml
+++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml
@@ -36,9 +36,9 @@ if (! $this->compact): ?>
start <= time() && ! $downtime->is_in_effect): ?>
- = $this->translate('Started'); ?>
+ = $this->translate('Ends'); ?>
- = sprintf($this->translate('Ends %s'), $this->timeUntil($downtime->end, $this->compact)) ?>
+ = $this->timeUntil($downtime->end, $this->compact) ?>
= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?>
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 ebb45ccb0..e722532b8 100644
--- a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml
+++ b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml
@@ -2,9 +2,9 @@
|
start <= time() && ! $downtime->is_in_effect): ?>
- = $this->translate('Started'); ?>
+ = $this->translate('Ends'); ?>
- = sprintf($this->translate('Ends %s'), $this->timeUntil($downtime->end, $this->compact)) ?>
+ = $this->timeUntil($downtime->end, $this->compact) ?>
= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?>
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 4eb1b87eb..83766b8b6 100644
--- a/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml
+++ b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml
@@ -7,9 +7,9 @@
|
start <= time() && ! $downtime->is_in_effect): ?>
- = $this->translate('Started'); ?>
+ = $this->translate('Ends'); ?>
- = sprintf($this->translate('Ends %s'), $this->timeUntil($downtime->end, $this->compact)) ?>
+ = $this->timeUntil($downtime->end, $this->compact) ?>
= $downtime->is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?>
diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml
index fb3d86df8..2228c35cd 100644
--- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml
+++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml
@@ -53,7 +53,12 @@ if (empty($object->comments) && ! $addLink) {
$this->timeUntil($downtime->end)
);
} else {
- if ((bool) $downtime->is_fixed) {
+ if ($downtime->start <= time() && ! (bool) $downtime->is_in_effect) {
+ $state = sprintf(
+ $this->translate('ends %s', 'Last format parameter represents the end time'),
+ $this->timeUntil($downtime->end)
+ );
+ } elseif ((bool) $downtime->is_fixed) {
$state = sprintf(
$this->translate('scheduled %s', 'Last format parameter represents the time scheduled'),
$this->timeUntil($downtime->start)
|