Filter Services with no perfdata

This commit is contained in:
Virsacer 2020-06-27 18:24:23 +02:00
parent 387bda5f0e
commit 4852c7aec5

View file

@ -2,6 +2,7 @@
namespace Icinga\Module\Graphite\Controllers;
use Icinga\Data\Filter\Filter;
use Icinga\Module\Graphite\Forms\TimeRangePicker\TimeRangePickerTrait as TimeRangePicker;
use Icinga\Module\Graphite\Forms\TimeRangePicker\TimeRangePickerTrait as TimeRangePickerFormTrait;
use Icinga\Module\Graphite\Web\Controller\MonitoringAwareController;
@ -40,6 +41,8 @@ class ListController extends MonitoringAwareController
$this->backend->select()->from('hoststatus', ['host_name'])
);
$hostsQuery->applyFilter(Filter::expression('host_perfdata', '!=', ''));
$this->view->baseUrl = $baseUrl = Url::fromPath('monitoring/host/show');
TimeRangePickerFormTrait::copyAllRangeParameters(
$baseUrl->getParams(),
@ -76,6 +79,8 @@ class ListController extends MonitoringAwareController
$this->backend->select()->from('servicestatus', ['host_name', 'service_description'])
);
$servicesQuery->applyFilter(Filter::expression('service_perfdata', '!=', ''));
$this->view->hostBaseUrl = $hostBaseUrl = Url::fromPath('monitoring/host/show');
TimeRangePickerFormTrait::copyAllRangeParameters(
$hostBaseUrl->getParams(),