[icinga-checkins] icinga.org: icinga-reports/r1.8: fix empty contacts and contactgroups in host overview

git at icinga.org git at icinga.org
Sun Mar 3 19:51:29 CET 2013


Module: icinga-reports
Branch: r1.8
Commit: cac85a78a0a0e790186a9871e94f2f7b8dce1326
URL:    https://git.icinga.org/?p=icinga-reports.git;a=commit;h=cac85a78a0a0e790186a9871e94f2f7b8dce1326

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Sun Mar  3 18:16:42 2013 +0100

fix empty contacts and contactgroups in host overview

fixes #3686

---

 jasperreports/package/js-icinga-reports.zip        |  Bin 383520 -> 384754 bytes
 .../templates/sub/host/contactgroups.jrxml         |    6 ++++--
 jasperreports/templates/sub/host/contacts.jrxml    |    9 ++++++---
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/jasperreports/package/js-icinga-reports.zip b/jasperreports/package/js-icinga-reports.zip
index 210486e..5f5c632 100644
Binary files a/jasperreports/package/js-icinga-reports.zip and b/jasperreports/package/js-icinga-reports.zip differ
diff --git a/jasperreports/templates/sub/host/contactgroups.jrxml b/jasperreports/templates/sub/host/contactgroups.jrxml
index b85eeeb..401bf71 100644
--- a/jasperreports/templates/sub/host/contactgroups.jrxml
+++ b/jasperreports/templates/sub/host/contactgroups.jrxml
@@ -42,12 +42,14 @@ from icinga_objects a,
   icinga_contacts b,
   icinga_contactgroups c,
   icinga_contactgroup_members d,
-  icinga_host_contactgroups e
+  icinga_host_contactgroups e,
+  icinga_hosts f
 where a.object_id            = b.contact_object_id
 and b.contact_object_id      = d.contact_object_id
 and d.contactgroup_id        = c.contactgroup_id
 and c.contactgroup_object_id = e.contactgroup_object_id
-and e.host_id                = $P{p_host_object_id}]]>
+and e.host_id                = f.host_id
+and f.host_object_id         = $P{p_host_object_id}]]>
 		</queryString>
 		<field name="alias" class="java.lang.String"/>
 		<field name="name1" class="java.lang.String"/>
diff --git a/jasperreports/templates/sub/host/contacts.jrxml b/jasperreports/templates/sub/host/contacts.jrxml
index adba991..a66ad09 100644
--- a/jasperreports/templates/sub/host/contacts.jrxml
+++ b/jasperreports/templates/sub/host/contacts.jrxml
@@ -39,10 +39,13 @@
   b.email_address
 from icinga_objects a,
   icinga_contacts b,
-  icinga_host_contacts c
+  icinga_host_contacts c,
+  icinga_hosts d
 where a.object_id = b.contact_object_id
-and b.contact_id  = c.contact_object_id
-and c.host_id     = $P{p_host_object_id}]]>
+and b.contact_object_id  = c.contact_object_id
+and c.host_id     = d.host_id
+and d.host_object_id = $P{p_host_object_id}]]>
+
 		</queryString>
 		<field name="name1" class="java.lang.String"/>
 		<field name="alias" class="java.lang.String"/>





More information about the icinga-checkins mailing list