Skip to content

Commit f21a691

Browse files
(Host/Service)Controller: Add missing onlyWithCustomVarSources() call
1 parent d185a1b commit f21a691

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
@@ -373,6 +373,7 @@ public function completeAction(): void
373373
{
374374
$suggestions = (new ObjectSuggestions())
375375
->setModel(DependencyNode::class)
376+
->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup'])
376377
->setBaseFilter(Filter::equal("child.host.id", $this->host->id))
377378
->forRequest($this->getServerRequest());
378379

@@ -383,6 +384,7 @@ public function childrenCompleteAction(): void
383384
{
384385
$suggestions = (new ObjectSuggestions())
385386
->setModel(DependencyNode::class)
387+
->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup'])
386388
->setBaseFilter(Filter::equal("parent.host.id", $this->host->id))
387389
->forRequest($this->getServerRequest());
388390

Diff for: application/controllers/ServiceController.php

+2
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ public function completeAction(): void
336336
{
337337
$suggestions = (new ObjectSuggestions())
338338
->setModel(DependencyNode::class)
339+
->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup'])
339340
->setBaseFilter(Filter::equal("child.service.id", $this->service->id))
340341
->forRequest($this->getServerRequest());
341342

@@ -346,6 +347,7 @@ public function childrenCompleteAction(): void
346347
{
347348
$suggestions = (new ObjectSuggestions())
348349
->setModel(DependencyNode::class)
350+
->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup'])
349351
->setBaseFilter(Filter::equal("parent.service.id", $this->service->id))
350352
->forRequest($this->getServerRequest());
351353

0 commit comments

Comments
 (0)