mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
ServiceGroup: allow to assign them to services...
...via assignment rules fixes #13415
This commit is contained in:
parent
52f0fc9177
commit
f1a61e2557
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Icinga\Module\Director\Forms;
|
||||
|
||||
use Icinga\Module\Director\Objects\IcingaService;
|
||||
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
|
||||
|
||||
class IcingaServiceGroupForm extends DirectorObjectForm
|
||||
@ -17,6 +18,21 @@ class IcingaServiceGroupForm extends DirectorObjectForm
|
||||
));
|
||||
|
||||
$this->addGroupDisplayNameElement()
|
||||
->addAssignmentElements()
|
||||
->setButtons();
|
||||
}
|
||||
|
||||
protected function addAssignmentElements()
|
||||
{
|
||||
$this->addAssignFilter(array(
|
||||
'columns' => IcingaService::enumProperties($this->db, 'service.'),
|
||||
'required' => true,
|
||||
'description' => $this->translate(
|
||||
'This allows you to configure an assignment filter. Please feel'
|
||||
. ' free to combine as many nested operators as you want'
|
||||
)
|
||||
));
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,9 @@ namespace Icinga\Module\Director\Objects;
|
||||
class IcingaServiceGroup extends IcingaObjectGroup
|
||||
{
|
||||
protected $table = 'icinga_servicegroup';
|
||||
|
||||
public function supportsAssignments()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user