ServiceController: make sure to set branch and...

...host on Service Form
This commit is contained in:
Thomas Gelf 2021-10-19 10:36:08 +02:00
parent 4f959572f2
commit cb16733420

View File

@ -141,6 +141,9 @@ class ServiceController extends ObjectController
$object = $this->object;
$this->addTitle($object->getObjectName());
$form = IcingaServiceForm::load()->setDb($this->db());
$form->setBranch($this->getBranch());
if ($this->host) {
$this->actions()->add(Link::create(
$this->translate('back'),
@ -148,10 +151,9 @@ class ServiceController extends ObjectController
['uuid' => $this->host->getUniqueId()->toString()],
['class' => 'icon-left-big']
));
$form->setHost($this->host);
}
$form = IcingaServiceForm::load()->setDb($this->db());
if ($this->set) {
$form->setServiceSet($this->set);
}