[icinga-checkins] icinga.org: icinga-web/r1.7: Notification View, bugfixing Hostgroup credential for services

git at icinga.org git at icinga.org
Fri Aug 3 11:53:00 CEST 2012


Module: icinga-web
Branch: r1.7
Commit: 2a2fe2f48bbc32e2ad46bf60a831809d5bb2c296
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=2a2fe2f48bbc32e2ad46bf60a831809d5bb2c296

Author: Marius Hein <marius.hein at netways.de>
Date:   Fri Aug  3 11:52:27 2012 +0200

Notification View, bugfixing Hostgroup credential for services

---

 app/modules/Api/config/views/notifications.xml |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/app/modules/Api/config/views/notifications.xml b/app/modules/Api/config/views/notifications.xml
index c5c716d..de2f4a6 100644
--- a/app/modules/Api/config/views/notifications.xml
+++ b/app/modules/Api/config/views/notifications.xml
@@ -56,11 +56,21 @@
             </credential>
            
            <credential name="IcingaHostgroup" type="dql">
+                
                 <leftjoin>o.host h</leftjoin>
                 <leftjoin>h.hostgroups hg</leftjoin>
                 <leftjoin>hg.object hgo</leftjoin>
+                
+                <leftjoin>o.service s</leftjoin>
+                <leftjoin>s.host ch</leftjoin>
+                <leftjoin>ch.hostgroups chg</leftjoin>
+                <leftjoin>chg.object chgo</leftjoin>
+                
                 <andwhere>
-                    (o.objecttype_id = 2 OR hgo.name1 IN (${credential_value}))
+                    (
+                        (o.objecttype_id=1 AND hgo.name1 IN (${credential_value}))
+                        OR (o.objecttype_id=2 AND chgo.name1 IN (${credential_value}))
+                    )
                 </andwhere>
             </credential>
             <!--





More information about the icinga-checkins mailing list