[icinga-checkins] icinga.org: icinga-reports/master: Fix Bug #3312: Add .multiply(100) in valueExpression and labelExpression

git at icinga.org git at icinga.org
Sun Mar 3 17:58:17 CET 2013


Module: icinga-reports
Branch: master
Commit: 00bac32198acd95d5ce2c716855cb78de5fcd2de
URL:    https://git.icinga.org/?p=icinga-reports.git;a=commit;h=00bac32198acd95d5ce2c716855cb78de5fcd2de

Author: Michael Luebben <michael_luebben at web.de>
Date:   Tue Dec 18 12:46:06 2012 +0100

Fix Bug #3312: Add .multiply(100) in valueExpression and labelExpression

---

 .../sub/host/availabilityInGivenTime.jrxml         |    4 ++--
 .../sub/service/availabilityInGivenTime.jrxml      |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/jasperreports/templates/sub/host/availabilityInGivenTime.jrxml b/jasperreports/templates/sub/host/availabilityInGivenTime.jrxml
index 29ef42f..298b6b0 100644
--- a/jasperreports/templates/sub/host/availabilityInGivenTime.jrxml
+++ b/jasperreports/templates/sub/host/availabilityInGivenTime.jrxml
@@ -140,8 +140,8 @@ and object_id                      = $P{p_host_object_id}]]>
 						</datasetRun>
 					</dataset>
 					<keyExpression><![CDATA[$F{state}.toString().replaceFirst("0", "OK").replaceFirst("1", "NOK")]]></keyExpression>
-					<valueExpression><![CDATA[$F{sla}.setScale(3,BigDecimal.ROUND_HALF_UP)]]></valueExpression>
-					<labelExpression><![CDATA[$F{sla}.setScale(3,BigDecimal.ROUND_HALF_UP).toString() + "%"]]></labelExpression>
+					<valueExpression><![CDATA[$F{sla}.setScale(3,BigDecimal.ROUND_HALF_UP).multiply(100)]]></valueExpression>
+					<labelExpression><![CDATA[$F{sla}.setScale(3,BigDecimal.ROUND_HALF_UP).multiply(100).toString() + "%"]]></labelExpression>
 				</pieDataset>
 				<pie3DPlot depthFactor="0.2" isCircular="false" labelFormat="" legendLabelFormat="{0} ({1} %)">
 					<plot backgroundAlpha="0.0" foregroundAlpha="0.5">
diff --git a/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml b/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml
index 2597f2c..e5871b8 100644
--- a/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml
+++ b/jasperreports/templates/sub/service/availabilityInGivenTime.jrxml
@@ -148,8 +148,8 @@ AND icinga_objects.object_id    = $P{p_service_object_id}]]>
 						</datasetRun>
 					</dataset>
 					<keyExpression><![CDATA[$F{state}.toString().replaceFirst("0", "OK").replaceFirst("1", "NOK")]]></keyExpression>
-					<valueExpression><![CDATA[$F{sla}.setScale(3,BigDecimal.ROUND_HALF_UP)]]></valueExpression>
-					<labelExpression><![CDATA[$F{sla}.setScale(3,BigDecimal.ROUND_HALF_UP).toString() + "%"]]></labelExpression>
+					<valueExpression><![CDATA[$F{sla}.setScale(3,BigDecimal.ROUND_HALF_UP).multiply(100)]]></valueExpression>
+					<labelExpression><![CDATA[$F{sla}.setScale(3,BigDecimal.ROUND_HALF_UP).multiply(100).toString() + "%"]]></labelExpression>
 				</pieDataset>
 				<pie3DPlot depthFactor="0.2" isCircular="false" labelFormat="" legendLabelFormat="{0} ({1} %)">
 					<plot backgroundAlpha="0.0" foregroundAlpha="0.5">





More information about the icinga-checkins mailing list