From a40e89f9d0a2feab545e98d05045fb00081fa870 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 5 Nov 2019 12:36:59 +0100 Subject: [PATCH] ServicesController: Fetch service state summary --- application/controllers/ServicesController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/controllers/ServicesController.php b/application/controllers/ServicesController.php index 65e98d4a..3d9d5b83 100644 --- a/application/controllers/ServicesController.php +++ b/application/controllers/ServicesController.php @@ -3,6 +3,7 @@ namespace Icinga\Module\Icingadb\Controllers; use Icinga\Module\Icingadb\Model\Service; +use Icinga\Module\Icingadb\Model\ServicestateSummary; use Icinga\Module\Icingadb\Web\Controller; use Icinga\Module\Icingadb\Widget\ServiceList; @@ -19,6 +20,7 @@ class ServicesController extends Controller 'host', 'host.state' ]); + $summary = ServicestateSummary::on($db)->with('state'); $limitControl = $this->createLimitControl(); $paginationControl = $this->createPaginationControl($services); @@ -26,8 +28,9 @@ class ServicesController extends Controller $filterControl = $this->createFilterControl($services); $this->filter($services); + $this->filter($summary); - yield $this->export($services); + yield $this->export($services, $summary); $serviceList = (new ServiceList($services)) ->setViewMode($viewModeSwitcher->getViewMode());