From fc2a50a9ffa40c1b67f78d7e5bea208c3c7e99d8 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 3 Jun 2015 14:39:43 +0200 Subject: [PATCH] monitoring: Add missing restrictable filter columns to the host status summary data view refs #9009 --- .../library/Monitoring/DataView/Hoststatussummary.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/DataView/Hoststatussummary.php b/modules/monitoring/library/Monitoring/DataView/Hoststatussummary.php index 094c40b95..292698376 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hoststatussummary.php +++ b/modules/monitoring/library/Monitoring/DataView/Hoststatussummary.php @@ -30,7 +30,7 @@ class Hoststatussummary extends DataView public function getFilterColumns() { return array( - 'host', 'host_alias', 'host_name', + 'host', 'host_alias', 'host_display_name', 'host_name', 'hostgroup', 'hostgroup_alias', 'hostgroup_name', 'service', 'service_description', 'service_display_name', 'servicegroup', 'servicegroup_alias', 'servicegroup_name' @@ -42,6 +42,12 @@ class Hoststatussummary extends DataView */ public function isValidFilterTarget($column) { - return in_array($column, $this->getFilterColumns()); + if ($column[0] === '_' + && preg_match('/^_(?:host|service)_/', $column) + ) { + return true; + } else { + return in_array($column, $this->getFilterColumns()); + } } }