icingaweb2-module-director/application/controllers/HostController.php

29 lines
857 B
PHP
Raw Normal View History

<?php
2015-10-20 22:34:04 +02:00
namespace Icinga\Module\Director\Controllers;
use Icinga\Module\Director\Web\Controller\ObjectController;
2015-10-20 22:34:04 +02:00
class HostController extends ObjectController
{
2015-12-10 13:00:08 +01:00
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);
}
}