Host/ObjectController: no sets in branches

This commit is contained in:
Thomas Gelf 2021-12-17 08:06:20 +01:00
parent 60104327bf
commit 7f22c12f9f
2 changed files with 10 additions and 0 deletions

View File

@ -119,6 +119,10 @@ class HostController extends ObjectController
$host = $this->getHostObject();
$this->addServicesHeader();
$this->addTitle($this->translate('Add Service Set to %s'), $host->getObjectName());
if ($this->showNotInBranch($this->translate('Creating Service Sets'))) {
return;
}
$this->content()->add(
IcingaServiceSetForm::load()
->setHost($host)

View File

@ -130,6 +130,12 @@ abstract class ObjectController extends ActionController
if ($oType = $this->params->get('type', 'object')) {
$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 ($this->showNotInBranch($this->translate('Creating Templates'))) {