[icinga-checkins] icinga.org: icinga-reports/mluebben/r1.5: Fix bug with blank pages in host and service activity report

git at icinga.org git at icinga.org
Tue Jun 14 12:47:30 CEST 2011


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

Author: Michael Luebben <michael_luebben at web.de>
Date:   Tue Jun 14 12:47:08 2011 +0200

Fix bug with blank pages in host and service activity report

---

 .../templates/sub/host/activityInGivenTime.jrxml   |    6 +++---
 .../sub/service/activityInGivenTime.jrxml          |    6 +++---
 .../sub/service/availabilityInGivenTime.jrxml      |    9 +++++++--
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/jasperreports/templates/sub/host/activityInGivenTime.jrxml b/jasperreports/templates/sub/host/activityInGivenTime.jrxml
index 9207272..c488c15 100644
--- a/jasperreports/templates/sub/host/activityInGivenTime.jrxml
+++ b/jasperreports/templates/sub/host/activityInGivenTime.jrxml
@@ -315,7 +315,7 @@ and object_id                  = $P{p_host_object_id}]]>
 		</band>
 		<band height="50">
 			<subreport>
-				<reportElement x="0" y="0" width="555" height="50"/>
+				<reportElement x="0" y="0" width="555" height="50" isRemoveLineWhenBlank="true"/>
 				<subreportParameter name="SUBREPORT_DIR">
 					<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
 				</subreportParameter>
@@ -334,7 +334,7 @@ and object_id                  = $P{p_host_object_id}]]>
 		</band>
 		<band height="50">
 			<subreport>
-				<reportElement x="0" y="0" width="555" height="50"/>
+				<reportElement x="0" y="0" width="555" height="50" isRemoveLineWhenBlank="true"/>
 				<subreportParameter name="SUBREPORT_DIR">
 					<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
 				</subreportParameter>
@@ -353,7 +353,7 @@ and object_id                  = $P{p_host_object_id}]]>
 		</band>
 		<band height="50">
 			<subreport>
-				<reportElement x="0" y="0" width="555" height="50"/>
+				<reportElement x="0" y="0" width="555" height="50" isRemoveLineWhenBlank="true"/>
 				<subreportParameter name="p_object_name">
 					<subreportParameterExpression><![CDATA[$P{p_host_name}]]></subreportParameterExpression>
 				</subreportParameter>
diff --git a/jasperreports/templates/sub/service/activityInGivenTime.jrxml b/jasperreports/templates/sub/service/activityInGivenTime.jrxml
index f52e4ff..ddf6b05 100644
--- a/jasperreports/templates/sub/service/activityInGivenTime.jrxml
+++ b/jasperreports/templates/sub/service/activityInGivenTime.jrxml
@@ -312,7 +312,7 @@ and object_id                  = $P{p_service_object_id}]]>
 		</band>
 		<band height="50">
 			<subreport>
-				<reportElement x="0" y="0" width="555" height="50"/>
+				<reportElement x="0" y="0" width="555" height="50" isRemoveLineWhenBlank="true"/>
 				<subreportParameter name="p_object_name">
 					<subreportParameterExpression><![CDATA[$F{name1}]]></subreportParameterExpression>
 				</subreportParameter>
@@ -331,7 +331,7 @@ and object_id                  = $P{p_service_object_id}]]>
 		</band>
 		<band height="50">
 			<subreport>
-				<reportElement x="0" y="0" width="555" height="50"/>
+				<reportElement x="0" y="0" width="555" height="50" isRemoveLineWhenBlank="true"/>
 				<subreportParameter name="p_object_name">
 					<subreportParameterExpression><![CDATA[$F{name1}]]></subreportParameterExpression>
 				</subreportParameter>
@@ -350,7 +350,7 @@ and object_id                  = $P{p_service_object_id}]]>
 		</band>
 		<band height="50">
 			<subreport>
-				<reportElement x="0" y="0" width="555" height="50"/>
+				<reportElement x="0" y="0" width="555" height="50" isRemoveLineWhenBlank="true"/>
 				<subreportParameter name="p_object_name">
 					<subreportParameterExpression><![CDATA[$F{name1}]]></subreportParameterExpression>
 				</subreportParameter>
diff --git a/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml b/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml
index 2e73bc3..d364ee1 100644
--- a/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml
+++ b/jasperreports/templates/sub/service/availabilityInGivenTime.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="Service availability sub report in given time" language="groovy" pageWidth="555" pageHeight="842" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
 	<property name="ireport.zoom" value="1.0"/>
 	<property name="ireport.x" value="0"/>
-	<property name="ireport.y" value="0"/>
+	<property name="ireport.y" value="48"/>
 	<subDataset name="graph_availability">
 		<parameter name="p_service_object_id" class="java.lang.String">
 			<defaultValueExpression><![CDATA[$P{p_service_object_id}]]></defaultValueExpression>
@@ -220,7 +220,12 @@ and icinga_objects.object_id    = $P{p_service_object_id}]]>
 					<labelExpression><![CDATA[($F{sum(state_duration)} / ($P{p_period} / 100) ).setScale(3,BigDecimal.ROUND_HALF_UP).toString() + "%"]]></labelExpression>
 				</pieDataset>
 				<pie3DPlot isCircular="false" labelFormat="" legendLabelFormat="{0} ({1} %)">
-					<plot/>
+					<plot backgroundAlpha="0.0" foregroundAlpha="1.0">
+						<seriesColor seriesOrder="0" color="#66FF66"/>
+						<seriesColor seriesOrder="1" color="#FF9933"/>
+						<seriesColor seriesOrder="2" color="#BF44B2"/>
+						<seriesColor seriesOrder="3" color="#FF3333"/>
+					</plot>
 					<itemLabel color="#000000" backgroundColor="#FFFFFF">
 						<font size="8"/>
 					</itemLabel>





More information about the icinga-checkins mailing list