mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
TemplatechoicesController: new routes, slim ctrl
This commit is contained in:
parent
cc2cb11cf3
commit
a48a7f4236
35
application/controllers/TemplatechoicesController.php
Normal file
35
application/controllers/TemplatechoicesController.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\Controllers;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\Web\Controller\ActionController;
|
||||||
|
use Icinga\Module\Director\Web\Table\ChoicesTable;
|
||||||
|
|
||||||
|
class TemplatechoicesController extends ActionController
|
||||||
|
{
|
||||||
|
protected function checkDirectorPermissions()
|
||||||
|
{
|
||||||
|
$this->assertPermission('director/admin');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hostAction()
|
||||||
|
{
|
||||||
|
$this->addSingleTab('Choices')
|
||||||
|
->addTitle($this->translate('Host template choices'));
|
||||||
|
ChoicesTable::create('host', $this->db())->renderTo($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function serviceAction()
|
||||||
|
{
|
||||||
|
$this->addSingleTab('Choices')
|
||||||
|
->addTitle($this->translate('Service template choices'));
|
||||||
|
ChoicesTable::create('service', $this->db())->renderTo($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function notificationAction()
|
||||||
|
{
|
||||||
|
$this->addSingleTab('Choices')
|
||||||
|
->addTitle($this->translate('Notification template choices'));
|
||||||
|
ChoicesTable::create('notification', $this->db())->renderTo($this);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user