From 0eadf612f078240693a9e630f4f6785c79f89379 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 14 Oct 2024 12:03:47 +0200 Subject: [PATCH] Hostgroup: Add missing `name` param for search-editor's suggestionUrl --- application/controllers/HostgroupController.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/application/controllers/HostgroupController.php b/application/controllers/HostgroupController.php index e48adca20..66d75a261 100644 --- a/application/controllers/HostgroupController.php +++ b/application/controllers/HostgroupController.php @@ -84,14 +84,8 @@ public function indexAction(): Generator $sortControl->getSortParam(), $viewModeSwitcher->getViewModeParam(), 'name' - ])->setSuggestionUrl(Url::fromPath( - 'icingadb/hostgroup/complete', - [ - 'name' => $this->hostgroupName, - '_disableLayout' => true, - 'showCompact' => true - ] - )); + ]); + $searchBar->getSuggestionUrl()->addParams(['name' => $this->hostgroupName]); if ($searchBar->hasBeenSent() && ! $searchBar->isValid()) { if ($searchBar->hasBeenSubmitted()) { @@ -155,6 +149,7 @@ public function searchEditorAction(): void ViewModeSwitcher::DEFAULT_VIEW_MODE_PARAM, 'name' ]); + $editor->getSuggestionUrl()->addParams(['name' => $this->hostgroupName]); $this->getDocument()->add($editor); $this->setTitle(t('Adjust Filter'));