CommandArgument: list and objecct controller action

This commit is contained in:
Thomas Gelf 2015-06-01 16:29:32 +02:00
parent 5e21301eb5
commit c90bf45dd1
2 changed files with 27 additions and 0 deletions

View File

@ -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(

View File

@ -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')