ServicesetController: allow branch access
This commit is contained in:
parent
59d62d0ff9
commit
c56b190469
|
@ -71,7 +71,9 @@ class ServicesetController extends ObjectController
|
||||||
['class' => 'icon-plus']
|
['class' => 'icon-plus']
|
||||||
));
|
));
|
||||||
|
|
||||||
IcingaServiceSetServiceTable::load($set)->renderTo($this);
|
IcingaServiceSetServiceTable::load($set)
|
||||||
|
->setBranch($this->getBranch())
|
||||||
|
->renderTo($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hostsAction()
|
public function hostsAction()
|
||||||
|
@ -98,16 +100,17 @@ class ServicesetController extends ObjectController
|
||||||
|
|
||||||
protected function addServiceSetTabs()
|
protected function addServiceSetTabs()
|
||||||
{
|
{
|
||||||
if ($this->branch->isBranch()) {
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
$hexUuid = $this->object->getUniqueId()->toString();
|
$hexUuid = $this->object->getUniqueId()->toString();
|
||||||
$tabs = $this->tabs();
|
$tabs = $this->tabs();
|
||||||
$tabs->add('services', [
|
$tabs->add('services', [
|
||||||
'url' => 'director/serviceset/services',
|
'url' => 'director/serviceset/services',
|
||||||
'urlParams' => ['uuid' => $hexUuid],
|
'urlParams' => ['uuid' => $hexUuid],
|
||||||
'label' => 'Services'
|
'label' => 'Services'
|
||||||
])->add('hosts', [
|
]);
|
||||||
|
if ($this->branch->isBranch()) {
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
$tabs->add('hosts', [
|
||||||
'url' => 'director/serviceset/hosts',
|
'url' => 'director/serviceset/hosts',
|
||||||
'urlParams' => ['uuid' => $hexUuid],
|
'urlParams' => ['uuid' => $hexUuid],
|
||||||
'label' => 'Hosts'
|
'label' => 'Hosts'
|
||||||
|
|
Loading…
Reference in New Issue