mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
ServicesController: Fetch service state summary
This commit is contained in:
parent
9b88d3d8d3
commit
a40e89f9d0
1 changed files with 4 additions and 1 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in a new issue