diff --git a/library/Icinga/Web/View/helpers/format.php b/library/Icinga/Web/View/helpers/format.php index 5d38cce62..01ec92ea5 100644 --- a/library/Icinga/Web/View/helpers/format.php +++ b/library/Icinga/Web/View/helpers/format.php @@ -21,16 +21,16 @@ $this->addHelperFunction('timeSincePrefix', function ($timestamp) { . ' '; }); -$this->addHelperFunction('timeUnless', function ($timestamp) { +$this->addHelperFunction('timeUntil', function ($timestamp) { if (! $timestamp) return ''; - return '' + return '' . Format::timeUntil($timestamp) . ''; }); -$this->addHelperFunction('timeUnlessPrefix', function ($timestamp) { +$this->addHelperFunction('timeUntilPrefix', function ($timestamp) { if (! $timestamp) return ''; - return '' + return '' . $this->translate(Format::timeUntilPrefix($timestamp)) . ''; }); diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml index 8f1ea2d7b..00c9c128e 100644 --- a/modules/monitoring/application/views/scripts/list/comments.phtml +++ b/modules/monitoring/application/views/scripts/list/comments.phtml @@ -58,7 +58,7 @@ foreach ($comments as $comment): persistent): ?>Comment is persistent
Expires: expiration) ? - $this->timeUnless($comment->expiration) : + $this->timeUntil($comment->expiration) : 'Never' ?> diff --git a/modules/monitoring/application/views/scripts/process/info.phtml b/modules/monitoring/application/views/scripts/process/info.phtml index 8eadc0a1d..57406664c 100644 --- a/modules/monitoring/application/views/scripts/process/info.phtml +++ b/modules/monitoring/application/views/scripts/process/info.phtml @@ -43,7 +43,7 @@ $cf = $this->getHelper('CommandForm'); notifications_enabled === '1'): ?> Temporarily disable disable_notif_expire_time): ?> -Will be re-enabled in timeUnless($ps->disable_notif_expire_time) ?> +Will be re-enabled in timeUntil($ps->disable_notif_expire_time) ?> diff --git a/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml index e5cf0e0a4..f0b39e603 100644 --- a/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml +++ b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml @@ -25,7 +25,7 @@ $cf = $this->getHelper('CommandForm'); 'host' => $object->host_name, 'service' => $object->service_description ) - ) ?>">img('img/icons/reschedule_petrol.png') ?> translate('Reschedule') ?> timeUnless($object->next_check) ?> + ) ?>">img('img/icons/reschedule_petrol.png') ?> translate('Reschedule') ?> timeUntil($object->next_check) ?> check_execution_time): ?> diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 829c108cd..8fcb1e892 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -18,9 +18,9 @@ foreach ($object->downtimes as $downtime) { $state = 'in downtime since ' . $this->timeSince($downtime->start); } else { if ($downtime->is_fixed) { - $state = 'scheduled ' . $this->timeUnless($downtime->start); + $state = 'scheduled ' . $this->timeUntil($downtime->start); } else { - $state = 'scheduled flexible ' . $this->timeUnless($downtime->start); + $state = 'scheduled flexible ' . $this->timeUntil($downtime->start); } }