SyncruleController: show properties per rule
This commit is contained in:
parent
6077ca6c75
commit
fb94db4363
|
@ -3,6 +3,7 @@
|
|||
use Icinga\Module\Director\Web\Controller\ActionController;
|
||||
use Icinga\Module\Director\Objects\SyncRule;
|
||||
use Icinga\Module\Director\Import\Sync;
|
||||
use Icinga\Data\Filter\Filter;
|
||||
use Icinga\Exception\InvalidPropertyException;
|
||||
use Icinga\Web\Notification;
|
||||
|
||||
|
@ -38,8 +39,13 @@ class Director_SyncruleController extends ActionController
|
|||
if ($edit) {
|
||||
$this->view->title = $this->translate('Edit sync rule');
|
||||
$this->getTabs()->add('edit', array(
|
||||
'url' => 'director/syncrule/edit' . '?id=' . $id,
|
||||
'url' => 'director/syncrule/edit',
|
||||
'urlParams' => array('id' => $id),
|
||||
'label' => $this->view->title,
|
||||
))->add('property', array(
|
||||
'label' => $this->translate('Properties'),
|
||||
'url' => 'director/syncrule/property',
|
||||
'urlParams' => array('rule_id' => $id)
|
||||
))->activate('edit');
|
||||
} else {
|
||||
$this->view->title = $this->translate('Add sync rule');
|
||||
|
@ -61,4 +67,27 @@ class Director_SyncruleController extends ActionController
|
|||
|
||||
$this->render('object/form', null, true);
|
||||
}
|
||||
|
||||
public function propertyAction()
|
||||
{
|
||||
$id = $this->params->get('rule_id');
|
||||
|
||||
$this->view->addLink = $this->view->qlink(
|
||||
$this->translate('Add sync property rule'),
|
||||
'director/syncproperty/add'
|
||||
);
|
||||
$this->getTabs()->add('edit', array(
|
||||
'url' => 'director/syncrule/edit',
|
||||
'urlParams' => array('id' => $id),
|
||||
'label' => $this->translate('Edit sync rule'),
|
||||
))->add('property', array(
|
||||
'label' => $this->translate('Properties'),
|
||||
'url' => 'director/syncrule/property',
|
||||
'urlParams' => array('rule_id' => $id)
|
||||
))->activate('property');
|
||||
|
||||
$this->view->title = $this->translate('Sync properties: ');
|
||||
$this->view->table = $this->loadTable('syncproperty')->enforceFilter(Filter::where('rule_id', $id))->setConnection($this->db());
|
||||
$this->render('list/table', null, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue