Skip to content

Commit 4852c7a

Browse files
committed
Filter Services with no perfdata
1 parent 387bda5 commit 4852c7a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

application/controllers/ListController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Icinga\Module\Graphite\Controllers;
44

5+
use Icinga\Data\Filter\Filter;
56
use Icinga\Module\Graphite\Forms\TimeRangePicker\TimeRangePickerTrait as TimeRangePicker;
67
use Icinga\Module\Graphite\Forms\TimeRangePicker\TimeRangePickerTrait as TimeRangePickerFormTrait;
78
use Icinga\Module\Graphite\Web\Controller\MonitoringAwareController;
@@ -40,6 +41,8 @@ public function hostsAction()
4041
$this->backend->select()->from('hoststatus', ['host_name'])
4142
);
4243

44+
$hostsQuery->applyFilter(Filter::expression('host_perfdata', '!=', ''));
45+
4346
$this->view->baseUrl = $baseUrl = Url::fromPath('monitoring/host/show');
4447
TimeRangePickerFormTrait::copyAllRangeParameters(
4548
$baseUrl->getParams(),
@@ -76,6 +79,8 @@ public function servicesAction()
7679
$this->backend->select()->from('servicestatus', ['host_name', 'service_description'])
7780
);
7881

82+
$servicesQuery->applyFilter(Filter::expression('service_perfdata', '!=', ''));
83+
7984
$this->view->hostBaseUrl = $hostBaseUrl = Url::fromPath('monitoring/host/show');
8085
TimeRangePickerFormTrait::copyAllRangeParameters(
8186
$hostBaseUrl->getParams(),

0 commit comments

Comments
 (0)