diff --git a/modules/monitoring/application/controllers/DowntimeController.php b/modules/monitoring/application/controllers/DowntimeController.php index dcf4dc373a..ec1da00ef3 100644 --- a/modules/monitoring/application/controllers/DowntimeController.php +++ b/modules/monitoring/application/controllers/DowntimeController.php @@ -13,10 +13,25 @@ */ class Monitoring_DowntimeController extends Controller { + /** + * The fetched downtime + * + * @var stdClass + */ protected $downtime; - + + /** + * If the downtime is a service or not + * + * @var boolean + */ protected $isService; - + + /** + * Fetch the downtime matching the given id and add tabs + * + * @throws Zend_Controller_Action_Exception + */ public function init() { $downtimeId = $this->params->get('downtime_id'); @@ -54,7 +69,7 @@ public function init() } else { $this->isService = false; } - + $this->getTabs() ->add( 'downtime', @@ -68,7 +83,10 @@ public function init() ) )->activate('downtime')->extend(new DashboardAction()); } - + + /** + * Display the detail view for a downtime + */ public function showAction() { $this->view->downtime = $this->downtime; @@ -86,7 +104,12 @@ public function showAction() $this->view->delDowntimeForm = $this->createDelDowntimeForm(); } } - + + /** + * Create a command form to delete a single comment + * + * @return DeleteDowntimeCommandForm + */ private function createDelDowntimeForm() { $this->assertPermission('monitoring/command/downtime/delete'); diff --git a/modules/monitoring/application/controllers/DowntimesController.php b/modules/monitoring/application/controllers/DowntimesController.php index bbd3e1bb47..d25a757b59 100644 --- a/modules/monitoring/application/controllers/DowntimesController.php +++ b/modules/monitoring/application/controllers/DowntimesController.php @@ -14,10 +14,25 @@ */ class Monitoring_DowntimesController extends Controller { + /** + * The fetched downtimes + * + * @var array + */ protected $downtimes; - + + /** + * A filter matching all current downtimes + * + * @var Filter + */ protected $filter; - + + /** + * Fetch all downtimes matching the current filter and add tabs + * + * @throws Zend_Controller_Action_Exception + */ public function init() { $this->filter = Filter::fromQueryString(str_replace( @@ -82,7 +97,10 @@ public function init() } } } - + + /** + * Display the detail view for a downtime list + */ public function showAction() { $this->view->downtimes = $this->downtimes; @@ -91,7 +109,10 @@ public function showAction() $this->view->removeAllLink = Url::fromPath('monitoring/downtimes/remove-all') ->setParams($this->params); } - + + /** + * Display the form for removing a downtime list + */ public function removeAllAction() { $this->assertPermission('monitoring/command/downtime/delete');