diff --git a/modules/monitoring/application/controllers/ServicesController.php b/modules/monitoring/application/controllers/ServicesController.php index 17e82124b..6c826b304 100644 --- a/modules/monitoring/application/controllers/ServicesController.php +++ b/modules/monitoring/application/controllers/ServicesController.php @@ -92,7 +92,12 @@ class ServicesController extends Controller public function showAction() { $this->setAutorefreshInterval(15); - if ($this->Auth()->hasPermission('monitoring/command/schedule-check')) { + $activeChecksEnabled = $this->serviceList->getFeatureStatus()['active_checks_enabled'] !== 0; + if ($this->Auth()->hasPermission('monitoring/command/schedule-check') + || ($this->Auth()->hasPermission('monitoring/command/schedule-check/active-only') + && $activeChecksEnabled + ) + ) { $checkNowForm = new CheckNowCommandForm(); $checkNowForm ->setObjects($this->serviceList) @@ -119,8 +124,10 @@ class ServicesController extends Controller ->handleRequest(); $this->view->toggleFeaturesForm = $toggleFeaturesForm; - $this->setAutorefreshInterval(15); - $this->view->rescheduleAllLink = Url::fromRequest()->setPath('monitoring/services/reschedule-check'); + if ($activeChecksEnabled) { + $this->view->rescheduleAllLink = Url::fromRequest()->setPath('monitoring/services/reschedule-check'); + } + $this->view->downtimeAllLink = Url::fromRequest()->setPath('monitoring/services/schedule-downtime'); $this->view->processCheckResultAllLink = Url::fromRequest()->setPath( 'monitoring/services/process-check-result' diff --git a/modules/monitoring/application/views/scripts/services/show.phtml b/modules/monitoring/application/views/scripts/services/show.phtml index 05f17b871..b7375d454 100644 --- a/modules/monitoring/application/views/scripts/services/show.phtml +++ b/modules/monitoring/application/views/scripts/services/show.phtml @@ -183,6 +183,7 @@ +