[icinga-checkins] icinga.org: icinga-reports/mluebben/r1.5: Fix double availability reports

git at icinga.org git at icinga.org
Tue Jun 28 16:48:49 CEST 2011


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

Author: Michael Luebben <michael_luebben at web.de>
Date:   Tue Jun 28 16:47:27 2011 +0200

Fix double availability reports

---

 jasperreports/package/icinga-reports.zip           |  Bin 245774 -> 245795 bytes
 .../main/host/activityReportInGivenTime.jrxml      |   11 ++++-------
 .../main/host/availabilityReportInGivenTime.jrxml  |   11 ++++-------
 .../sub/service/availabilityInGivenTime.jrxml      |   14 +++++++-------
 4 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/jasperreports/package/icinga-reports.zip b/jasperreports/package/icinga-reports.zip
index 57955d1..da4fe6f 100644
Binary files a/jasperreports/package/icinga-reports.zip and b/jasperreports/package/icinga-reports.zip differ
diff --git a/jasperreports/templates/main/host/activityReportInGivenTime.jrxml b/jasperreports/templates/main/host/activityReportInGivenTime.jrxml
index 1157d05..a399be4 100644
--- a/jasperreports/templates/main/host/activityReportInGivenTime.jrxml
+++ b/jasperreports/templates/main/host/activityReportInGivenTime.jrxml
@@ -2,7 +2,7 @@
 <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Activity report about a selected Host in a given time" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isTitleNewPage="true">
 	<property name="ireport.zoom" value="1.3310000000000004"/>
 	<property name="ireport.x" value="0"/>
-	<property name="ireport.y" value="705"/>
+	<property name="ireport.y" value="0"/>
 	<template><![CDATA["repo:/Icinga/styles/IcingaStyleBase.jrtx"]]></template>
 	<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
 		<defaultValueExpression><![CDATA["repo:/icinga/templates/sub/"]]></defaultValueExpression>
@@ -20,14 +20,11 @@
 from icinga_objects,
   icinga_hosts
 where icinga_objects.object_id = icinga_hosts.host_object_id
+and icinga_hosts.config_type = 1
 and object_id                  = $P{p_host_object_id}]]>
 	</queryString>
-	<field name="name1" class="java.lang.String">
-		<fieldDescription><![CDATA[]]></fieldDescription>
-	</field>
-	<field name="address" class="java.lang.String">
-		<fieldDescription><![CDATA[]]></fieldDescription>
-	</field>
+	<field name="name1" class="java.lang.String"/>
+	<field name="address" class="java.lang.String"/>
 	<background>
 		<band splitType="Stretch"/>
 	</background>
diff --git a/jasperreports/templates/main/host/availabilityReportInGivenTime.jrxml b/jasperreports/templates/main/host/availabilityReportInGivenTime.jrxml
index 66667d7..23fa1da 100644
--- a/jasperreports/templates/main/host/availabilityReportInGivenTime.jrxml
+++ b/jasperreports/templates/main/host/availabilityReportInGivenTime.jrxml
@@ -2,7 +2,7 @@
 <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Availability report about a selected Host in a given time" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isTitleNewPage="true">
 	<property name="ireport.zoom" value="1.0000000000000009"/>
 	<property name="ireport.x" value="0"/>
-	<property name="ireport.y" value="429"/>
+	<property name="ireport.y" value="0"/>
 	<template><![CDATA["repo:/Icinga/styles/IcingaStyleBase.jrtx"]]></template>
 	<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
 		<defaultValueExpression><![CDATA["repo:/icinga/templates/sub/"]]></defaultValueExpression>
@@ -20,14 +20,11 @@
 from icinga_objects,
   icinga_hosts
 where icinga_objects.object_id = icinga_hosts.host_object_id
+and icinga_hosts.config_type = 1
 and object_id                  = $P{p_host_object_id}]]>
 	</queryString>
-	<field name="name1" class="java.lang.String">
-		<fieldDescription><![CDATA[]]></fieldDescription>
-	</field>
-	<field name="address" class="java.lang.String">
-		<fieldDescription><![CDATA[]]></fieldDescription>
-	</field>
+	<field name="name1" class="java.lang.String"/>
+	<field name="address" class="java.lang.String"/>
 	<background>
 		<band splitType="Stretch"/>
 	</background>
diff --git a/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml b/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml
index 142000f..85bb9e7 100644
--- a/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml
+++ b/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml
@@ -134,13 +134,13 @@ GROUP BY state_one]]>
 	</parameter>
 	<parameter name="p_host_name" class="java.lang.String"/>
 	<queryString>
-		<![CDATA[select name2,
-  timestampdiff(second, $P{p_date_start}, $P{p_date_end}) as period
-from icinga_objects,
-  icinga_services
-where icinga_objects.object_id  = icinga_services.service_object_id
-and icinga_services.config_type = 1
-and icinga_objects.object_id    = $P{p_service_object_id}]]>
+		<![CDATA[SELECT name2, timestampdiff(second, $P{p_date_start}, $P{p_date_end}) AS period
+FROM icinga_objects, icinga_services, icinga_hosts
+WHERE icinga_objects.object_id  = icinga_hosts.host_object_id
+AND icinga_hosts.host_object_id = icinga_services.service_object_id
+AND icinga_services.config_type = 1
+AND icinga_hosts.config_type = 1
+AND icinga_objects.object_id    = $P{p_service_object_id}]]>
 	</queryString>
 	<field name="name2" class="java.lang.String"/>
 	<field name="period" class="java.lang.Long"/>





More information about the icinga-checkins mailing list