2015-04-24 14:27:22 +02:00
|
|
|
<?php
|
|
|
|
|
2015-06-30 11:27:32 +02:00
|
|
|
use Icinga\Module\Director\Web\Controller\ActionController;
|
2015-04-24 14:27:22 +02:00
|
|
|
|
|
|
|
class Director_ListController extends ActionController
|
|
|
|
{
|
2015-06-01 12:18:13 +02:00
|
|
|
public function activitylogAction()
|
|
|
|
{
|
2015-06-29 10:13:39 +02:00
|
|
|
$this->setConfigTabs()->activate('activitylog');
|
2015-06-01 12:18:13 +02:00
|
|
|
$this->view->title = $this->translate('Activity Log');
|
2015-07-23 16:19:22 +02:00
|
|
|
$this->view->table = $this->applyPaginationLimits(
|
|
|
|
$this->loadTable('activityLog')->setConnection($this->db())
|
|
|
|
);
|
2015-06-01 12:18:13 +02:00
|
|
|
$this->render('table');
|
|
|
|
}
|
2015-06-18 10:54:44 +02:00
|
|
|
|
2015-07-02 14:13:42 +02:00
|
|
|
public function datalistAction()
|
|
|
|
{
|
2015-07-03 14:00:40 +02:00
|
|
|
$this->view->addLink = $this->view->qlink(
|
|
|
|
$this->translate('Add list'),
|
2015-07-03 14:21:14 +02:00
|
|
|
'director/datalist/add'
|
2015-07-03 14:00:40 +02:00
|
|
|
);
|
|
|
|
|
2015-07-02 14:13:42 +02:00
|
|
|
$this->setConfigTabs()->activate('datalist');
|
|
|
|
$this->view->title = $this->translate('Data lists');
|
2015-07-23 16:19:22 +02:00
|
|
|
$this->view->table = $this->applyPaginationLimits(
|
|
|
|
$this->loadTable('datalist')->setConnection($this->db())
|
|
|
|
);
|
2015-07-02 14:13:42 +02:00
|
|
|
$this->render('table');
|
|
|
|
}
|
|
|
|
|
2015-07-21 15:16:18 +02:00
|
|
|
public function importsourceAction()
|
|
|
|
{
|
|
|
|
$this->view->addLink = $this->view->qlink(
|
|
|
|
$this->translate('Add import source'),
|
|
|
|
'director/importsource/add'
|
|
|
|
);
|
|
|
|
|
2015-07-22 10:12:50 +02:00
|
|
|
$this->setImportTabs()->activate('importsource');
|
2015-07-21 15:16:18 +02:00
|
|
|
$this->view->title = $this->translate('Import source');
|
2015-07-23 16:19:22 +02:00
|
|
|
$this->view->table = $this->applyPaginationLimits(
|
|
|
|
$this->loadTable('importsource')->setConnection($this->db())
|
|
|
|
);
|
2015-07-21 15:16:18 +02:00
|
|
|
$this->render('table');
|
|
|
|
}
|
|
|
|
|
2015-07-22 10:12:50 +02:00
|
|
|
public function importrunAction()
|
|
|
|
{
|
|
|
|
$this->setImportTabs()->activate('importrun');
|
|
|
|
$this->view->title = $this->translate('Import runs');
|
2015-07-23 16:19:22 +02:00
|
|
|
$this->view->table = $this->applyPaginationLimits(
|
|
|
|
$this->loadTable('importrun')->setConnection($this->db())
|
|
|
|
);
|
2015-07-22 10:12:50 +02:00
|
|
|
$this->render('table');
|
|
|
|
}
|
|
|
|
|
2015-07-23 16:36:58 +02:00
|
|
|
public function syncruleAction()
|
|
|
|
{
|
|
|
|
$this->view->addLink = $this->view->qlink(
|
|
|
|
$this->translate('Add sync rule'),
|
|
|
|
'director/syncrule/add'
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->setImportTabs()->activate('syncrule');
|
|
|
|
$this->view->title = $this->translate('Sync rule');
|
|
|
|
$this->view->table = $this->loadTable('syncrule')->setConnection($this->db());
|
|
|
|
$this->render('table');
|
|
|
|
}
|
|
|
|
|
2015-07-24 09:51:31 +02:00
|
|
|
public function syncpropertyAction()
|
|
|
|
{
|
|
|
|
$this->view->addLink = $this->view->qlink(
|
|
|
|
$this->translate('Add sync property rule'),
|
|
|
|
'director/syncproperty/add'
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->setImportTabs()->activate('syncproperty');
|
|
|
|
$this->view->title = $this->translate('Sync property');
|
|
|
|
$this->view->table = $this->loadTable('syncproperty')->setConnection($this->db());
|
|
|
|
$this->render('table');
|
|
|
|
}
|
|
|
|
|
2015-07-22 13:41:13 +02:00
|
|
|
public function datalistentryAction()
|
|
|
|
{
|
|
|
|
$listId = $this->params->get('list_id');
|
|
|
|
$this->view->lastId = $listId;
|
|
|
|
|
|
|
|
$this->view->addLink = $this->view->qlink(
|
|
|
|
$this->translate('Add entry'),
|
|
|
|
'director/datalistentry/add' . '?list_id=' . $listId
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->view->title = $this->translate('List entries');
|
|
|
|
$this->getTabs()->add('editlist', array(
|
|
|
|
'url' => 'director/datalist/edit' . '?id=' . $listId,
|
|
|
|
'label' => $this->translate('Edit list'),
|
|
|
|
))->add('datalistentry', array(
|
|
|
|
'url' => 'director/datalistentry' . '?list_id=' . $listId,
|
|
|
|
'label' => $this->view->title,
|
|
|
|
))->activate('datalistentry');
|
|
|
|
|
2015-07-23 16:19:22 +02:00
|
|
|
$this->view->table = $this->applyPaginationLimits(
|
|
|
|
$this->loadTable('datalistEntry')->setConnection($this->db())
|
|
|
|
);
|
2015-07-22 13:41:13 +02:00
|
|
|
$this->render('table');
|
|
|
|
}
|
|
|
|
|
2015-07-03 10:49:47 +02:00
|
|
|
public function datafieldAction()
|
|
|
|
{
|
2015-07-03 10:53:39 +02:00
|
|
|
$this->view->addLink = $this->view->qlink(
|
2015-07-03 11:20:58 +02:00
|
|
|
$this->translate('Add field'),
|
2015-07-03 14:21:14 +02:00
|
|
|
'director/datafield/add'
|
2015-07-03 10:53:39 +02:00
|
|
|
);
|
|
|
|
|
2015-07-03 10:49:47 +02:00
|
|
|
$this->setConfigTabs()->activate('datafield');
|
|
|
|
$this->view->title = $this->translate('Data fields');
|
2015-07-23 16:19:22 +02:00
|
|
|
$this->view->table = $this->applyPaginationLimits(
|
|
|
|
$this->loadTable('datafield')->setConnection($this->db())
|
|
|
|
);
|
2015-07-03 10:49:47 +02:00
|
|
|
$this->render('table');
|
|
|
|
}
|
|
|
|
|
2015-06-18 10:54:44 +02:00
|
|
|
public function generatedconfigAction()
|
|
|
|
{
|
2015-06-29 10:13:39 +02:00
|
|
|
$this->view->addLink = $this->view->qlink(
|
|
|
|
$this->translate('Generate'),
|
|
|
|
'director/config/store'
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->setConfigTabs()->activate('generatedconfig');
|
2015-06-18 10:54:44 +02:00
|
|
|
$this->view->title = $this->translate('Generated Configs');
|
2015-07-23 16:19:22 +02:00
|
|
|
$this->view->table = $this->applyPaginationLimits(
|
|
|
|
$this->loadTable('generatedConfig')->setConnection($this->db())
|
|
|
|
);
|
2015-06-18 10:54:44 +02:00
|
|
|
$this->render('table');
|
|
|
|
}
|
2015-04-24 14:27:22 +02:00
|
|
|
}
|