From c56b190469bcc1d3c511498d0569388ed24cf2e3 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 20 Sep 2022 12:54:28 +0200 Subject: [PATCH] ServicesetController: allow branch access --- application/controllers/ServicesetController.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/application/controllers/ServicesetController.php b/application/controllers/ServicesetController.php index c5507c0c..684d2fc8 100644 --- a/application/controllers/ServicesetController.php +++ b/application/controllers/ServicesetController.php @@ -71,7 +71,9 @@ class ServicesetController extends ObjectController ['class' => 'icon-plus'] )); - IcingaServiceSetServiceTable::load($set)->renderTo($this); + IcingaServiceSetServiceTable::load($set) + ->setBranch($this->getBranch()) + ->renderTo($this); } public function hostsAction() @@ -98,16 +100,17 @@ class ServicesetController extends ObjectController protected function addServiceSetTabs() { - if ($this->branch->isBranch()) { - return $this; - } $hexUuid = $this->object->getUniqueId()->toString(); $tabs = $this->tabs(); $tabs->add('services', [ 'url' => 'director/serviceset/services', 'urlParams' => ['uuid' => $hexUuid], 'label' => 'Services' - ])->add('hosts', [ + ]); + if ($this->branch->isBranch()) { + return $this; + } + $tabs->add('hosts', [ 'url' => 'director/serviceset/hosts', 'urlParams' => ['uuid' => $hexUuid], 'label' => 'Hosts'