[icinga-checkins] icinga.org: icinga-web/master: 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: master
Commit: 612634884188f06374c2ace5cc6bc233e2df850a
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=612634884188f06374c2ace5cc6bc233e2df850a

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 69e253d..4b46028 100644
--- a/app/modules/Api/config/views/notifications.xml
+++ b/app/modules/Api/config/views/notifications.xml
@@ -76,11 +76,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