[icinga-checkins] icinga.org: icinga-web/next: statusmap broken

git at icinga.org git at icinga.org
Tue Apr 9 16:57:59 CEST 2013


Module: icinga-web
Branch: next
Commit: 3c0a537cd4ac568ffe822d1b3d224bda82dba26b
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=3c0a537cd4ac568ffe822d1b3d224bda82dba26b

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Apr  9 16:55:08 2013 +0200

statusmap broken

Fix broken status map. Problem is the order of query items.
We have to add first the join. After that we can add the
select which contains references to the join.

fixes #3539

---

 app/modules/Api/config/views/misc.xml |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/app/modules/Api/config/views/misc.xml b/app/modules/Api/config/views/misc.xml
index a178bf7..61ba86d 100644
--- a/app/modules/Api/config/views/misc.xml
+++ b/app/modules/Api/config/views/misc.xml
@@ -286,11 +286,16 @@
 
         <dql name="TARGET_STATUSMAP_HOST" base="TARGET_HOST">
             <extend>
-                <select>COALESCE(hp.host_object_id,-1) HOST_PARENT_OBJECT_ID</select>
-
+                <!--
+                 * Keep in mind, order is important.
+                 * 1st Add the join to query
+                 * 2nd Append a new select based on the join
+                -->
                 <leftjoin>
                     h.parents AS hp
                 </leftjoin>
+
+                <select>COALESCE(hp.host_object_id,-1) HOST_PARENT_OBJECT_ID</select>
             </extend>
         </dql>
 





More information about the icinga-checkins mailing list