diff --git a/modules/monitoring/application/controllers/DowntimeController.php b/modules/monitoring/application/controllers/DowntimeController.php index 32c183ba1..37f466807 100644 --- a/modules/monitoring/application/controllers/DowntimeController.php +++ b/modules/monitoring/application/controllers/DowntimeController.php @@ -76,12 +76,14 @@ class Monitoring_DowntimeController extends Controller public function showAction() { + if (false === $this->downtime) { + return; + } $this->view->downtime = $this->downtime; $this->view->isService = $this->isService; $this->view->stateName = isset($this->downtime->service_description) ? Service::getStateText($this->downtime->service_state) : Host::getStateText($this->downtime->host_state); - $this->view->delDowntimeForm = $this->createDelDowntimeForm(); $this->view->listAllLink = Url::fromPath('monitoring/list/downtimes'); $this->view->showHostLink = Url::fromPath('monitoring/host/show') diff --git a/modules/monitoring/application/views/scripts/downtime/show.phtml b/modules/monitoring/application/views/scripts/downtime/show.phtml index 34751cd7c..ddc91eeeb 100644 --- a/modules/monitoring/application/views/scripts/downtime/show.phtml +++ b/modules/monitoring/application/views/scripts/downtime/show.phtml @@ -1,4 +1,10 @@
+ + translate('No scheduled downtime matching the filter.') ?> +
+ + + compact): ?> tabs; ?> diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml index 2dd62761e..b21e3c3fb 100644 --- a/modules/monitoring/application/views/scripts/list/downtimes.phtml +++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml @@ -15,7 +15,8 @@ if (! $this->compact): ?> translate('No downtimes found matching the filter') . ''; + echo $this->translate('No downtimes found matching the filter,' + . ' maybe the downtime already expired.') . ''; return; } ?>