From a2a645892d16c5048065521eecce460023ad706f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 16 Sep 2014 18:46:58 +0200 Subject: [PATCH] monitoring: Add `HostController' --- .../controllers/HostController.php | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 modules/monitoring/application/controllers/HostController.php diff --git a/modules/monitoring/application/controllers/HostController.php b/modules/monitoring/application/controllers/HostController.php new file mode 100644 index 000000000..7799cb4ec --- /dev/null +++ b/modules/monitoring/application/controllers/HostController.php @@ -0,0 +1,69 @@ +backend, $this->params->get('host')); + if ($host->fetch() === false) { + throw new Zend_Controller_Action_Exception($this->translate('Host not found')); + } + $this->object = $host; + } + + /** + * Acknowledge a host problem + */ + public function acknowledgeProblemAction() + { + $this->view->title = $this->translate('Acknowledge Host Problem'); + $this->handleCommandForm(new AcknowledgeProblemCommandForm()); + } + + /** + * Add a host comment + */ + public function addCommentAction() + { + $this->view->title = $this->translate('Add Host Comment'); + $this->handleCommandForm(new AddCommentCommandForm()); + } + + /** + * Reschedule a host check + */ + public function rescheduleCheckAction() + { + $this->view->title = $this->translate('Reschedule Host Check'); + $this->handleCommandForm(new ScheduleHostCheckCommandForm()); + } + + /** + * Schedule a host downtime + */ + public function scheduleDowntimeAction() + { + $this->view->title = $this->translate('Schedule Host Downtime'); + $this->handleCommandForm(new ScheduleHostDowntimeCommandForm()); + } +}