From 85d9943fb2e0d69f57f46a9a364e426c8ae76d41 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 3 Dec 2019 11:26:39 +0100 Subject: [PATCH] Service groups: Apply base filter to badge links --- application/controllers/ServicegroupsController.php | 4 +++- library/Icingadb/Widget/ItemList/ServicegroupListItem.php | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/application/controllers/ServicegroupsController.php b/application/controllers/ServicegroupsController.php index ace29614..4d3b60b7 100644 --- a/application/controllers/ServicegroupsController.php +++ b/application/controllers/ServicegroupsController.php @@ -28,6 +28,8 @@ class ServicegroupsController extends Controller $this->addControl($limitControl); $this->addControl($filterControl); - $this->addContent(new ServicegroupList($servicegroups)); + $this->addContent( + (new ServicegroupList($servicegroups))->setBaseFilter($this->getFilter()) + ); } } diff --git a/library/Icingadb/Widget/ItemList/ServicegroupListItem.php b/library/Icingadb/Widget/ItemList/ServicegroupListItem.php index f4de1f65..77ad0b7a 100644 --- a/library/Icingadb/Widget/ItemList/ServicegroupListItem.php +++ b/library/Icingadb/Widget/ItemList/ServicegroupListItem.php @@ -29,7 +29,11 @@ class ServicegroupListItem extends BaseTableRowItem if ($this->item->services_total > 0) { $badges = new ServiceStateBadges($this->item); - $badges->getUrl()->getParams()->mergeValues(['servicegroup.name' => $this->item->name]); + $badges + ->setBaseFilter($this->list->getBaseFilter()) + ->getUrl() + ->getParams() + ->mergeValues(['servicegroup.name' => $this->item->name]); $columns->add([ $this->createColumn(HtmlString::create($servicesChart->render())),