From 93e54fac62560889f7921a921411219dade808fa Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 20 Aug 2013 23:37:49 +0200 Subject: [PATCH] Trying hard to get aggregations done right --- .../Monitoring/Backend/Ido/Query/HoststatusQuery.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php index 68ae7ead1..a48b76cdd 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php @@ -155,6 +155,14 @@ class HoststatusQuery extends AbstractQuery "so.$this->object_id = ss.service_object_id", array() ); + foreach ($this->columns as $col) { + $real = $this->aliasToColumnName($col); + if (substr($real, 0, 4) === 'SUM(') { + continue; + } + $this->baseQuery->group($real); + } + $this->uglySlowConservativeCount = true; } protected function joinHostgroups()