mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-26 23:34:10 +02:00
HostController: add services tab
This commit is contained in:
parent
a0f0870566
commit
3e577ce65b
@ -6,4 +6,23 @@ use Icinga\Module\Director\Web\Controller\ObjectController;
|
||||
|
||||
class HostController extends ObjectController
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
if ($this->object) {
|
||||
$this->getTabs()->add('services', array(
|
||||
'url' => 'director/host/services',
|
||||
'urlParams' => array('name' => $this->object->object_name),
|
||||
'label' => 'Services'
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
public function servicesAction()
|
||||
{
|
||||
$this->getTabs()->activate('services');
|
||||
$this->view->title = $this->translate('Services');
|
||||
$this->view->table = $this->loadTable('IcingaService')->enforceFilter('host_id', $this->object->id)->setConnection($this->db());
|
||||
$this->render('objects/table', null, true);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user