From 121fdaadb00150cc3c06bbff238a6c10d353989c Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 8 Nov 2017 15:40:43 +0100 Subject: [PATCH] Allow to search for host and servicegroups by their case insensitive names too refs #2971 --- .../library/Monitoring/Backend/Ido/Query/HostgroupQuery.php | 1 + .../library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php | 1 + .../monitoring/library/Monitoring/DataView/Hostgroupsummary.php | 2 +- .../library/Monitoring/DataView/Servicegroupsummary.php | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupQuery.php index a043626e3..3dae8caf2 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupQuery.php @@ -20,6 +20,7 @@ class HostgroupQuery extends IdoQuery protected $columnMap = array( 'hostgroups' => array( + 'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci', 'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci', 'hostgroup_name' => 'hgo.name1' ), diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php index ad23bc3ca..ab5942aae 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php @@ -26,6 +26,7 @@ class ServicegroupQuery extends IdoQuery 'service_description' => 'so.name2' ), 'servicegroups' => array( + 'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci', 'servicegroup_alias' => 'sg.alias COLLATE latin1_general_ci', 'servicegroup_name' => 'sgo.name1' ), diff --git a/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php b/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php index 42720b71c..de8df3c7f 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php +++ b/modules/monitoring/library/Monitoring/DataView/Hostgroupsummary.php @@ -34,7 +34,7 @@ class Hostgroupsummary extends DataView public function getSearchColumns() { - return array('hostgroup_name', 'hostgroup_alias'); + return array('hostgroup', 'hostgroup_alias'); } public function getSortRules() diff --git a/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php b/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php index 194da6cb4..3104f4d85 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicegroupsummary.php @@ -27,7 +27,7 @@ class Servicegroupsummary extends DataView public function getSearchColumns() { - return array('servicegroup_name', 'servicegroup_alias'); + return array('servicegroup', 'servicegroup_alias'); } public function getSortRules()