Skip to content

Commit 49278c6

Browse files
(Host/Service)Controller: Add missing onlyWithCustomVarSources() call
1 parent 7068ddc commit 49278c6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: application/controllers/HostController.php

+2
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ public function completeAction(): void
379379
{
380380
$suggestions = (new ObjectSuggestions())
381381
->setModel(DependencyNode::class)
382+
->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup'])
382383
->setBaseFilter(Filter::equal("child.host.id", $this->host->id))
383384
->forRequest($this->getServerRequest());
384385

@@ -389,6 +390,7 @@ public function childrenCompleteAction(): void
389390
{
390391
$suggestions = (new ObjectSuggestions())
391392
->setModel(DependencyNode::class)
393+
->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup'])
392394
->setBaseFilter(Filter::equal("parent.host.id", $this->host->id))
393395
->forRequest($this->getServerRequest());
394396

Diff for: application/controllers/ServiceController.php

+2
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ public function completeAction(): void
342342
{
343343
$suggestions = (new ObjectSuggestions())
344344
->setModel(DependencyNode::class)
345+
->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup'])
345346
->setBaseFilter(Filter::equal("child.service.id", $this->service->id))
346347
->forRequest($this->getServerRequest());
347348

@@ -352,6 +353,7 @@ public function childrenCompleteAction(): void
352353
{
353354
$suggestions = (new ObjectSuggestions())
354355
->setModel(DependencyNode::class)
356+
->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup'])
355357
->setBaseFilter(Filter::equal("parent.service.id", $this->service->id))
356358
->forRequest($this->getServerRequest());
357359

0 commit comments

Comments
 (0)