GroupMemberTable: allow multi-select for hosts

fixes #1973
This commit is contained in:
Thomas Gelf 2019-10-03 09:44:51 +02:00
parent 3d0497d003
commit 88e8408a7b
1 changed files with 13 additions and 0 deletions

View File

@ -2,6 +2,7 @@
namespace Icinga\Module\Director\Web\Table;
use gipfl\IcingaWeb2\Table\Extension\MultiSelect;
use Icinga\Data\Filter\Filter;
use Icinga\Module\Director\Db;
use Icinga\Module\Director\IcingaConfig\AssignRenderer;
@ -13,6 +14,8 @@ use gipfl\IcingaWeb2\Url;
class GroupMemberTable extends ZfQueryBasedTable
{
use MultiSelect;
protected $searchColumns = [
'o.object_name',
// membership_type
@ -40,6 +43,16 @@ class GroupMemberTable extends ZfQueryBasedTable
$table->type = $type;
return $table;
}
public function assemble()
{
if ($this->type === 'host') {
$this->enableMultiSelect(
'director/hosts/edit',
'director/hosts',
['name']
);
}
}
public function setGroup(IcingaObjectGroup $group)
{