mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
ObjectController: allow Service Sets in Branches
This commit is contained in:
parent
de4b890e8b
commit
a684929cf5
@ -140,13 +140,6 @@ abstract class ObjectController extends ActionController
|
|||||||
if ($oType = $this->params->get('type', 'object')) {
|
if ($oType = $this->params->get('type', 'object')) {
|
||||||
$form->setPreferredObjectType($oType);
|
$form->setPreferredObjectType($oType);
|
||||||
}
|
}
|
||||||
if ($this->getTableName() === 'icinga_service_set'
|
|
||||||
&& $this->showNotInBranch($this->translate('Creating Service Sets'))
|
|
||||||
) {
|
|
||||||
$this->addTitle($this->translate('Create a new Service Set'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($oType === 'template') {
|
if ($oType === 'template') {
|
||||||
if ($this->showNotInBranch($this->translate('Creating Templates'))) {
|
if ($this->showNotInBranch($this->translate('Creating Templates'))) {
|
||||||
$this->addTitle($this->translate('Create a new Template'));
|
$this->addTitle($this->translate('Create a new Template'));
|
||||||
@ -174,7 +167,11 @@ abstract class ObjectController extends ActionController
|
|||||||
$object = $this->requireObject();
|
$object = $this->requireObject();
|
||||||
$this->tabs()->activate('modify');
|
$this->tabs()->activate('modify');
|
||||||
$this->addObjectTitle();
|
$this->addObjectTitle();
|
||||||
if ($object->isTemplate() && $this->showNotInBranch($this->translate('Modifying Templates'))) {
|
// Hint: Service Sets are 'templates' (as long as not being assigned to a host
|
||||||
|
if ($this->getTableName() !== 'icinga_service_set'
|
||||||
|
&& $object->isTemplate()
|
||||||
|
&& $this->showNotInBranch($this->translate('Modifying Templates'))
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($object->isApplyRule() && $this->showNotInBranch($this->translate('Modifying Apply Rules'))) {
|
if ($object->isApplyRule() && $this->showNotInBranch($this->translate('Modifying Apply Rules'))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user