diff --git a/application/controllers/ListController.php b/application/controllers/ListController.php index 7a9b1828..1d794125 100644 --- a/application/controllers/ListController.php +++ b/application/controllers/ListController.php @@ -26,6 +26,17 @@ class Director_ListController extends ActionController $this->render('table'); } + public function commandargumentsAction() + { + $this->view->addLink = $this->view->qlink( + $this->translate('Add Command Argument'), + 'director/object/commandargument' + ); + $this->view->title = $this->translate('Icinga Command Arguments'); + $this->view->table = $this->loadTable('icingaCommandArgument')->setConnection($this->db()); + $this->render('table'); + } + public function zonesAction() { $this->view->addLink = $this->view->qlink( diff --git a/application/controllers/ObjectController.php b/application/controllers/ObjectController.php index 0223db48..db7b86db 100644 --- a/application/controllers/ObjectController.php +++ b/application/controllers/ObjectController.php @@ -36,6 +36,22 @@ class Director_ObjectController extends ActionController $this->render('form'); } + public function commandargumentAction() + { + $this->view->form = $this->loadForm('icingaCommandArgument') + ->setDb($this->db()) + ->setSuccessUrl('director/list/commandargument'); + + if ($id = $this->params->get('id')) { + $this->view->form->loadObject($id); + $this->view->title = $this->translate('Modify Icinga Command Argument'); + } else { + $this->view->title = $this->translate('Add new Icinga Command Argument'); + } + $this->view->form->handleRequest(); + $this->render('form'); + } + public function zoneAction() { $this->view->form = $this->loadForm('icingaZone')