mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
ApplyRulesTable: remove action links for now...
...and allow to filter by inheritance
This commit is contained in:
parent
adf7920820
commit
f9271da888
@ -4,7 +4,9 @@ namespace Icinga\Module\Director\Web\Table;
|
|||||||
|
|
||||||
use Icinga\Data\Filter\Filter;
|
use Icinga\Data\Filter\Filter;
|
||||||
use Icinga\Exception\IcingaException;
|
use Icinga\Exception\IcingaException;
|
||||||
|
use Icinga\Module\Director\Db\IcingaObjectFilterHelper;
|
||||||
use Icinga\Module\Director\IcingaConfig\AssignRenderer;
|
use Icinga\Module\Director\IcingaConfig\AssignRenderer;
|
||||||
|
use Icinga\Module\Director\Objects\IcingaObject;
|
||||||
use ipl\Html\Icon;
|
use ipl\Html\Icon;
|
||||||
use ipl\Html\Link;
|
use ipl\Html\Link;
|
||||||
use ipl\Web\Table\ZfQueryBasedTable;
|
use ipl\Web\Table\ZfQueryBasedTable;
|
||||||
@ -27,7 +29,7 @@ class ApplyRulesTable extends ZfQueryBasedTable
|
|||||||
|
|
||||||
public function getColumnsToBeRendered()
|
public function getColumnsToBeRendered()
|
||||||
{
|
{
|
||||||
return ['Name', 'assign where', 'Actions'];
|
return ['Name', 'assign where'/*, 'Actions'*/];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderRow($row)
|
public function renderRow($row)
|
||||||
@ -39,10 +41,24 @@ class ApplyRulesTable extends ZfQueryBasedTable
|
|||||||
return static::tr([
|
return static::tr([
|
||||||
static::td(Link::create($row->object_name, $url)),
|
static::td(Link::create($row->object_name, $url)),
|
||||||
static::td($this->renderApplyFilter($row->assign_filter)),
|
static::td($this->renderApplyFilter($row->assign_filter)),
|
||||||
static::td($this->createActionLinks($row))->setSeparator(' ')
|
// NOT (YET) static::td($this->createActionLinks($row))->setSeparator(' ')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function filterTemplate(
|
||||||
|
IcingaObject $template,
|
||||||
|
$inheritance = IcingaObjectFilterHelper::INHERIT_DIRECT
|
||||||
|
) {
|
||||||
|
IcingaObjectFilterHelper::filterByTemplate(
|
||||||
|
$this->getQuery(),
|
||||||
|
$template,
|
||||||
|
'o',
|
||||||
|
$inheritance
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
protected function renderApplyFilter($assignFilter)
|
protected function renderApplyFilter($assignFilter)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user