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()
|
||||
{
|
||||
$this->setHostTabs()->activate('services');
|
||||
$this->view->addLink = $this->view->qlink(
|
||||
$this->translate('Add Service'),
|
||||
'director/object/service'
|
||||
|
@ -52,6 +53,7 @@ class Director_ListController extends ActionController
|
|||
|
||||
public function servicegroupsAction()
|
||||
{
|
||||
$this->setHostTabs()->activate('servicegroups');
|
||||
$this->view->addLink = $this->view->qlink(
|
||||
$this->translate('Add Servicegroup'),
|
||||
'director/object/servicegroup'
|
||||
|
@ -61,28 +63,6 @@ class Director_ListController extends ActionController
|
|||
$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()
|
||||
{
|
||||
$this->view->addLink = $this->view->qlink(
|
||||
|
|
|
@ -24,8 +24,6 @@ $section->add($this->translate('Hosts'))
|
|||
// SERVICE
|
||||
$section->add($this->translate('Services'))
|
||||
->setUrl('director/list/services');
|
||||
$section->add($this->translate('Servicegroups'))
|
||||
->setUrl('director/list/servicegroups');
|
||||
|
||||
// USER
|
||||
$section->add($this->translate('Users'))
|
||||
|
|
|
@ -57,6 +57,17 @@ abstract class ActionController extends Controller
|
|||
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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue