mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +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;
|
namespace Icinga\Module\Director\Forms;
|
||||||
|
|
||||||
|
use Icinga\Module\Director\Objects\IcingaService;
|
||||||
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
|
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
|
||||||
|
|
||||||
class IcingaServiceGroupForm extends DirectorObjectForm
|
class IcingaServiceGroupForm extends DirectorObjectForm
|
||||||
@ -17,6 +18,21 @@ class IcingaServiceGroupForm extends DirectorObjectForm
|
|||||||
));
|
));
|
||||||
|
|
||||||
$this->addGroupDisplayNameElement()
|
$this->addGroupDisplayNameElement()
|
||||||
|
->addAssignmentElements()
|
||||||
->setButtons();
|
->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
|
class IcingaServiceGroup extends IcingaObjectGroup
|
||||||
{
|
{
|
||||||
protected $table = 'icinga_servicegroup';
|
protected $table = 'icinga_servicegroup';
|
||||||
|
|
||||||
|
public function supportsAssignments()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user