From 9e79419eb1ae222eb2ab54bdf84bd9f67307381e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 9 Apr 2015 14:44:10 +0200 Subject: [PATCH] EventHistoryQuery: Provide `hostgroup_name' as alternative to `hostgroup' This can't be queried though until #7274 has been resolved. refs #8613 --- .../library/Monitoring/Backend/Ido/Query/EventHistoryQuery.php | 1 + modules/monitoring/library/Monitoring/DataView/EventHistory.php | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/EventHistoryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/EventHistoryQuery.php index d6dd52c452..0c77e82a6b 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/EventHistoryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/EventHistoryQuery.php @@ -44,6 +44,7 @@ class EventHistoryQuery extends IdoQuery ), 'hostgroups' => array( 'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci', + 'hostgroup_name' => 'hgo.name1' ), 'hosts' => array( 'host_display_name' => 'CASE WHEN sh.display_name IS NOT NULL THEN sh.display_name ELSE h.display_name END' diff --git a/modules/monitoring/library/Monitoring/DataView/EventHistory.php b/modules/monitoring/library/Monitoring/DataView/EventHistory.php index 2d56f4c5c8..c19a4a3760 100644 --- a/modules/monitoring/library/Monitoring/DataView/EventHistory.php +++ b/modules/monitoring/library/Monitoring/DataView/EventHistory.php @@ -22,6 +22,7 @@ public function getColumns() 'host_display_name', 'service_description', 'service_display_name', + 'hostgroup_name', 'object_type', 'timestamp', 'state',