Services: add tabs, remove menu item & legacy actions
This commit is contained in:
parent
c95c689609
commit
3d9fb846ed
|
@ -41,6 +41,7 @@ class Director_ListController extends ActionController
|
||||||
|
|
||||||
public function servicesAction()
|
public function servicesAction()
|
||||||
{
|
{
|
||||||
|
$this->setHostTabs()->activate('services');
|
||||||
$this->view->addLink = $this->view->qlink(
|
$this->view->addLink = $this->view->qlink(
|
||||||
$this->translate('Add Service'),
|
$this->translate('Add Service'),
|
||||||
'director/object/service'
|
'director/object/service'
|
||||||
|
@ -52,6 +53,7 @@ class Director_ListController extends ActionController
|
||||||
|
|
||||||
public function servicegroupsAction()
|
public function servicegroupsAction()
|
||||||
{
|
{
|
||||||
|
$this->setHostTabs()->activate('servicegroups');
|
||||||
$this->view->addLink = $this->view->qlink(
|
$this->view->addLink = $this->view->qlink(
|
||||||
$this->translate('Add Servicegroup'),
|
$this->translate('Add Servicegroup'),
|
||||||
'director/object/servicegroup'
|
'director/object/servicegroup'
|
||||||
|
@ -61,28 +63,6 @@ class Director_ListController extends ActionController
|
||||||
$this->render('table');
|
$this->render('table');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function servicegroupmembersAction()
|
|
||||||
{
|
|
||||||
$this->view->addLink = $this->view->qlink(
|
|
||||||
$this->translate('Add Servicegroup Member'),
|
|
||||||
'director/object/servicegroupmember'
|
|
||||||
);
|
|
||||||
$this->view->title = $this->translate('Icinga Servicegroup Members');
|
|
||||||
$this->view->table = $this->loadTable('icingaServiceGroupMember')->setConnection($this->db());
|
|
||||||
$this->render('table');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function servicevarsAction()
|
|
||||||
{
|
|
||||||
$this->view->addLink = $this->view->qlink(
|
|
||||||
$this->translate('Add Service Variable'),
|
|
||||||
'director/object/servicevar'
|
|
||||||
);
|
|
||||||
$this->view->title = $this->translate('Icinga Service Variables');
|
|
||||||
$this->view->table = $this->loadTable('icingaServiceVar')->setConnection($this->db());
|
|
||||||
$this->render('table');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function commandsAction()
|
public function commandsAction()
|
||||||
{
|
{
|
||||||
$this->view->addLink = $this->view->qlink(
|
$this->view->addLink = $this->view->qlink(
|
||||||
|
|
|
@ -24,8 +24,6 @@ $section->add($this->translate('Hosts'))
|
||||||
// SERVICE
|
// SERVICE
|
||||||
$section->add($this->translate('Services'))
|
$section->add($this->translate('Services'))
|
||||||
->setUrl('director/list/services');
|
->setUrl('director/list/services');
|
||||||
$section->add($this->translate('Servicegroups'))
|
|
||||||
->setUrl('director/list/servicegroups');
|
|
||||||
|
|
||||||
// USER
|
// USER
|
||||||
$section->add($this->translate('Users'))
|
$section->add($this->translate('Users'))
|
||||||
|
|
|
@ -57,6 +57,17 @@ abstract class ActionController extends Controller
|
||||||
return $this->view->tabs;
|
return $this->view->tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function setServiceTabs()
|
||||||
|
{
|
||||||
|
$this->view->tabs = Widget::create('tabs')->add('services', array(
|
||||||
|
'label' => $this->translate('Hosts'),
|
||||||
|
'url' => 'director/list/services')
|
||||||
|
)->add('servicegroups', array(
|
||||||
|
'label' => $this->translate('Servicegroups'),
|
||||||
|
'url' => 'director/list/servicegroups')
|
||||||
|
);
|
||||||
|
return $this->view->tabs;
|
||||||
|
}
|
||||||
|
|
||||||
protected function setIcingaTabs()
|
protected function setIcingaTabs()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue