[icinga-checkins] icinga.org: icinga-web/master: Fixed DISTINCT error on PostgreSQL when using customvar filters

git at icinga.org git at icinga.org
Sun Sep 8 18:05:47 CEST 2013


Module: icinga-web
Branch: master
Commit: 643b8774be222ceb5877750dde340bfdd74e80f6
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=643b8774be222ceb5877750dde340bfdd74e80f6

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Sun Sep  8 14:30:02 2013 +0200

Fixed DISTINCT error on PostgreSQL when using customvar filters

Occured in host status grids.

(fixes #4564)

---

 app/modules/Api/config/views/host.xml    |   12 ++++--------
 app/modules/Api/config/views/service.xml |    8 ++++----
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/app/modules/Api/config/views/host.xml b/app/modules/Api/config/views/host.xml
index 2a3951b..8760f27 100644
--- a/app/modules/Api/config/views/host.xml
+++ b/app/modules/Api/config/views/host.xml
@@ -94,25 +94,21 @@
             -->
             <filter name="customvariable_name" type="dql">
                 <join>h.customvariables cvh</join>
-                <select>cvh.varname AS customvariable_name</select>
-                <groupby>h.host_object_id</groupby>
+                <resolve>cvh.varname</resolve>
             </filter>
 
             <filter name="customvariable_value" type="dql">
                 <join>h.customvariables cvh</join>
-                <select>cvh.varvalue AS customvariable_value</select>
-                <groupby>h.host_object_id</groupby>
+                <resolve>cvh.varvalue</resolve>
             </filter>
             <filter name="host_customvariable_name" type="dql">
                 <join>h.customvariables cvh</join>
-                <select>cvh.varname AS host_customvariable_name</select>
-                <groupby>h.host_object_id</groupby>
+                <resolve>cvh.varname</resolve>
             </filter>
 
             <filter name="host_customvariable_value" type="dql">
                 <join>h.customvariables cvh</join>
-                <select>cvh.varvalue AS host_customvariable_value</select>
-                <groupby>h.host_object_id</groupby>
+                <resolve>cvh.varvalue</resolve>
             </filter>
 
             <filter name="hostgroup_name" type="dql">
diff --git a/app/modules/Api/config/views/service.xml b/app/modules/Api/config/views/service.xml
index b6c55aa..d559da7 100644
--- a/app/modules/Api/config/views/service.xml
+++ b/app/modules/Api/config/views/service.xml
@@ -122,21 +122,21 @@
             -->
             <filter name="customvariable_name" type="dql">
                 <join>s.customvariables cvs</join>
-                <select>cvs.varname AS customvariable_name</select>
+                <resolve>cvs.varname</resolve>
             </filter>
 
             <filter name="customvariable_value" type="dql">
                 <join>s.customvariables cvs</join>
-                <select>cvs.varvalue AS customvariable_value</select>
+                <resolve>cvs.varvalue</resolve>
             </filter>
             <filter name="host_customvariable_name" type="dql">
                 <leftjoin>h.customvariables cvh</leftjoin>
-                <select>cvh.varname AS host_customvariable_name</select>
+                <resolve>cvh.varname</resolve>
             </filter>
 
             <filter name="host_customvariable_value" type="dql">
                 <leftjoin>h.customvariables cvh</leftjoin>
-                <select>cvh.varvalue AS host_customvariable_value</select>
+                <resolve>cvh.varvalue</resolve>
             </filter>
 
             <filter name="hostgroup_name" type="dql">





More information about the icinga-checkins mailing list