From 82b03547048226362389687b9953d90a0e57b04f Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 5 Jun 2015 09:16:28 +0200 Subject: [PATCH] monitoring: Support filtering the service group overview by custom variables refs #9009 --- .../Monitoring/DataView/Servicegroupsummary.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php b/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php index 37045a4d5..6eb2d4711 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php @@ -44,7 +44,7 @@ class Servicegroupsummary extends DataView return array( 'services_severity', 'host', 'hostgroup', 'hostgroup_alias', 'hostgroup_name', - 'service', 'servicegroup', 'servicegroup_alias', 'servicegroup_name' + 'service', 'servicegroup' ); } @@ -89,4 +89,18 @@ class Servicegroupsummary extends DataView ) ); } + + /** + * {@inheritdoc} + */ + public function isValidFilterTarget($column) + { + if ($column[0] === '_' + && preg_match('/^_(?:host|service)_/', $column) + ) { + return true; + } else { + return parent::isValidFilterTarget($column); + } + } }