Commit ec035085 authored by Christoph Niemann's avatar Christoph Niemann
Browse files

fixed order of Overview and Details

parent 1850a44a
......@@ -3,7 +3,7 @@
<parent>/icinga/reports</parent>
<name>hostgroup</name>
<label>Hostgroup</label>
<creationDate>2016-09-27T22:50:04.765+02:00</creationDate>
<creationDate>2016-09-28T00:45:27.230+02:00</creationDate>
<updateDate>2011-11-08T11:53:02.541+01:00</updateDate>
<resource>HostgroupAvailabilityReportInGivenTime</resource>
<resource>HostgroupOverviewReport</resource>
......
......@@ -2,10 +2,10 @@
<reportUnit exportedWithPermissions="false">
<folder>/icinga/reports/hostgroup</folder>
<name>StatehistoryofaselectedServiceinagiventime_1</name>
<version>31</version>
<version>7</version>
<label>StatesAndDowntimes</label>
<creationDate>2016-09-27T22:53:27.918+02:00</creationDate>
<updateDate>2016-09-28T00:35:37.954+02:00</updateDate>
<creationDate>2016-09-28T00:45:33.147+02:00</creationDate>
<updateDate>2016-10-13T01:02:28.772+02:00</updateDate>
<mainReport>
<localResource
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -13,10 +13,10 @@
dataFile="StatehistoryofaselectedServiceinagiventime_jrxml.data" xsi:type="fileResource">
<folder>/icinga/reports/hostgroup/StatehistoryofaselectedServiceinagiventime_1_files</folder>
<name>StatehistoryofaselectedServiceinagiventime_jrxml</name>
<version>4</version>
<version>7</version>
<label>Main jrxml</label>
<description>Main jrxml</description>
<creationDate>2016-09-27T22:53:27.918+02:00</creationDate>
<creationDate>2016-09-28T00:45:33.147+02:00</creationDate>
<updateDate>2016-09-27T22:53:27.918+02:00</updateDate>
<fileType>jrxml</fileType>
</localResource>
......
......@@ -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 activity report in given time" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isTitleNewPage="true" isSummaryWithPageHeaderAndFooter="true" uuid="e675bcd9-2100-4a05-892b-4c6dea9a1eb8">
<property name="ireport.zoom" value="1.1269722013523666"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="375"/>
<property name="ireport.y" value="0"/>
<property name="ireport.jasperserver.reportUnit" value="/icinga/reports/hostgroup/StatehistoryofaselectedServiceinagiventime_1"/>
<property name="ireport.jasperserver.url" value="http://192.168.122.153:8080/jasperserver/services/repository"/>
<import value="org.icinga.reporting.DateHelper"/>
......@@ -216,7 +216,9 @@ and b.hostgroup_object_id = $P{p_hostgroup_object_id}]]>
</graphicElement>
</rectangle>
<textField>
<reportElement x="175" y="492" width="310" height="181" uuid="06e77416-8179-4ec4-85ad-0c010f318ea6"/>
<reportElement x="175" y="492" width="310" height="181" uuid="06e77416-8179-4ec4-85ad-0c010f318ea6">
<printWhenExpression><![CDATA[$P{addRESTLink}]]></printWhenExpression>
</reportElement>
<textFieldExpression><![CDATA["http://" + $P{servername}
+ ":8080/jasperserver/rest_v2/reports/icinga/reports/hostgroup/StatehistoryofaselectedServiceinagiventime_1.html?"
+ "p_date_start=" + $P{p_final_date_start}
......@@ -257,83 +259,6 @@ and b.hostgroup_object_id = $P{p_hostgroup_object_id}]]>
</textField>
</band>
</pageHeader>
<detail>
<band height="14" splitType="Stretch">
<printWhenExpression><![CDATA[$P{p_overview}]]></printWhenExpression>
<subreport>
<reportElement x="2" y="0" width="552" height="14" uuid="ffeb284f-97dc-49d1-9d8c-2bdf75d0f62f"/>
<subreportParameter name="p_final_date_start">
<subreportParameterExpression><![CDATA[$P{p_final_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_host_object_id">
<subreportParameterExpression><![CDATA[$F{host_object_id}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_end">
<subreportParameterExpression><![CDATA[$P{p_final_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_debug">
<subreportParameterExpression><![CDATA[$P{p_debug}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_overview">
<subreportParameterExpression><![CDATA[$P{p_overview}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_timeperiod">
<subreportParameterExpression><![CDATA[$P{p_timeperiod}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_end">
<subreportParameterExpression><![CDATA[$P{p_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_start">
<subreportParameterExpression><![CDATA[$P{p_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="servicesTrue">
<subreportParameterExpression><![CDATA[$P{servicesTrue}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "host/stateHistoryAndDowntimesHost"]]></subreportExpression>
</subreport>
</band>
<band height="15" splitType="Stretch">
<subreport>
<reportElement x="0" y="0" width="552" height="14" uuid="ed3fd812-ea70-4864-add9-9d5c17edb159"/>
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_start">
<subreportParameterExpression><![CDATA[$P{p_final_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_host_object_id">
<subreportParameterExpression><![CDATA[$F{host_object_id}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_end">
<subreportParameterExpression><![CDATA[$P{p_final_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_debug">
<subreportParameterExpression><![CDATA[$P{p_debug}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_overview">
<subreportParameterExpression><![CDATA[false]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_end">
<subreportParameterExpression><![CDATA[$P{p_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_timeperiod">
<subreportParameterExpression><![CDATA[$P{p_timeperiod}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_start">
<subreportParameterExpression><![CDATA[$P{p_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="servicesTrue">
<subreportParameterExpression><![CDATA[$P{servicesTrue}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "host/stateHistoryAndDowntimesHost"]]></subreportExpression>
</subreport>
</band>
</detail>
<pageFooter>
<band height="25" splitType="Stretch">
<rectangle radius="0">
......@@ -372,4 +297,90 @@ and b.hostgroup_object_id = $P{p_hostgroup_object_id}]]>
</rectangle>
</band>
</pageFooter>
<summary>
<band height="36">
<subreport>
<reportElement x="0" y="1" width="554" height="15" uuid="23e9480f-67ff-48f6-aec2-21295c352fba"/>
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_hostgroup_object_id">
<subreportParameterExpression><![CDATA[$P{p_hostgroup_object_id}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_start">
<subreportParameterExpression><![CDATA[$P{p_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_end">
<subreportParameterExpression><![CDATA[$P{p_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_timeperiod">
<subreportParameterExpression><![CDATA[$P{p_timeperiod}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_start">
<subreportParameterExpression><![CDATA[$P{p_final_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_end">
<subreportParameterExpression><![CDATA[$P{p_final_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="servicesTrue">
<subreportParameterExpression><![CDATA[$P{servicesTrue}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_overview">
<subreportParameterExpression><![CDATA[$P{p_overview}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_debug">
<subreportParameterExpression><![CDATA[$P{p_debug}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="servername">
<subreportParameterExpression><![CDATA[$P{servername}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="addRESTLink">
<subreportParameterExpression><![CDATA[$P{addRESTLink}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "Hostgroup/StatesAndDowntimesOverview"]]></subreportExpression>
</subreport>
<subreport>
<reportElement positionType="Float" x="0" y="19" width="555" height="15" uuid="4e9bf2ad-72d8-4ad0-a589-f4ff7ab10162"/>
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_hostgroup_object_id">
<subreportParameterExpression><![CDATA[$P{p_hostgroup_object_id}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_start">
<subreportParameterExpression><![CDATA[$P{p_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_end">
<subreportParameterExpression><![CDATA[$P{p_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_timeperiod">
<subreportParameterExpression><![CDATA[$P{p_timeperiod}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_start">
<subreportParameterExpression><![CDATA[$P{p_final_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_end">
<subreportParameterExpression><![CDATA[$P{p_final_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="servicesTrue">
<subreportParameterExpression><![CDATA[$P{servicesTrue}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_overview">
<subreportParameterExpression><![CDATA[$P{p_overview}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_debug">
<subreportParameterExpression><![CDATA[$P{p_debug}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="servername">
<subreportParameterExpression><![CDATA[$P{servername}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="addRESTLink">
<subreportParameterExpression><![CDATA[$P{addRESTLink}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "Hostgroup/StatesAndDowntimesDetails"]]></subreportExpression>
</subreport>
</band>
</summary>
</jasperReport>
......@@ -3,9 +3,10 @@
<parent>/icinga/templates</parent>
<name>sub</name>
<label>Sub</label>
<creationDate>2016-04-16T16:52:16.922+02:00</creationDate>
<creationDate>2016-09-28T00:45:27.793+02:00</creationDate>
<updateDate>2011-11-08T11:53:04.845+01:00</updateDate>
<folder>host</folder>
<folder>Hostgroup</folder>
<folder>object</folder>
<folder>other</folder>
<folder>page</folder>
......
<?xml version="1.0" encoding="UTF-8"?>
<folder exportedWithPermissions="false">
<parent>/icinga/templates/sub</parent>
<name>Hostgroup</name>
<label>Hostgroup</label>
<creationDate>2016-10-12T23:42:24.793+02:00</creationDate>
<updateDate>2016-10-12T23:42:24.793+02:00</updateDate>
<resource>StatesAndDowntimesDetails</resource>
<resource>StatesAndDowntimesOverview</resource>
</folder>
<?xml version="1.0" encoding="UTF-8"?>
<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="HG_SaD_Details" language="groovy" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="e675bcd9-2100-4a05-892b-4c6dea9a1eb8">
<property name="ireport.zoom" value="1.1269722013523666"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="ireport.jasperserver.reportUnit" value="/icinga/reports/hostgroup/StatehistoryofaselectedServiceinagiventime_1"/>
<property name="ireport.jasperserver.url" value="http://192.168.122.153:8080/jasperserver/services/repository"/>
<import value="org.icinga.reporting.DateHelper"/>
<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>
</parameter>
<parameter name="p_hostgroup_object_id" class="java.lang.Integer"/>
<parameter name="p_date_start" class="java.sql.Timestamp">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="p_date_end" class="java.sql.Timestamp">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="p_timeperiod" class="java.lang.String"/>
<parameter name="p_final_date_start" class="java.sql.Timestamp" isForPrompting="false">
<defaultValueExpression><![CDATA[$P{p_timeperiod} == "last_week" ? DateHelper.getLastWeekStart() : $P{p_timeperiod} == "last_month" ? DateHelper.getLastMonthStart() : $P{p_timeperiod} == "last_year" ? DateHelper.getLastYearStart() : $P{p_date_start}]]></defaultValueExpression>
</parameter>
<parameter name="p_final_date_end" class="java.sql.Timestamp" isForPrompting="false">
<defaultValueExpression><![CDATA[$P{p_timeperiod} == "last_week" ? DateHelper.getLastWeekEnd() : $P{p_timeperiod} == "last_month" ? DateHelper.getLastMonthEnd() : $P{p_timeperiod} == "last_year" ? DateHelper.getLastYearEnd() : $P{p_date_end}]]></defaultValueExpression>
</parameter>
<parameter name="servicesTrue" class="java.lang.Boolean"/>
<parameter name="p_overview" class="java.lang.Boolean">
<defaultValueExpression><![CDATA[false]]></defaultValueExpression>
</parameter>
<parameter name="p_debug" class="java.lang.Boolean">
<defaultValueExpression><![CDATA[false]]></defaultValueExpression>
</parameter>
<parameter name="servername" class="java.lang.String">
<defaultValueExpression><![CDATA["<SETSERVERNAMEinREPORT>"]]></defaultValueExpression>
</parameter>
<parameter name="addRESTLink" class="java.lang.Boolean"/>
<queryString>
<![CDATA[select a.host_object_id,
c.name1,
b.alias
from icinga_hostgroup_members a,
icinga_hostgroups b,
icinga_objects c
where a.hostgroup_id = b.hostgroup_id
and c.object_id = a.host_object_id
and b.hostgroup_object_id = $P{p_hostgroup_object_id}]]>
</queryString>
<field name="name1" class="java.lang.String"/>
<field name="name2" class="java.lang.String"/>
<field name="host_object_id" class="java.lang.Integer"/>
<field name="alias" class="java.lang.String"/>
<detail>
<band height="15" splitType="Stretch">
<subreport>
<reportElement x="0" y="0" width="552" height="14" uuid="ed3fd812-ea70-4864-add9-9d5c17edb159"/>
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_start">
<subreportParameterExpression><![CDATA[$P{p_final_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_host_object_id">
<subreportParameterExpression><![CDATA[$F{host_object_id}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_end">
<subreportParameterExpression><![CDATA[$P{p_final_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_debug">
<subreportParameterExpression><![CDATA[$P{p_debug}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_overview">
<subreportParameterExpression><![CDATA[false]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_end">
<subreportParameterExpression><![CDATA[$P{p_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_timeperiod">
<subreportParameterExpression><![CDATA[$P{p_timeperiod}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_start">
<subreportParameterExpression><![CDATA[$P{p_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="servicesTrue">
<subreportParameterExpression><![CDATA[$P{servicesTrue}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "host/stateHistoryAndDowntimesHost"]]></subreportExpression>
</subreport>
</band>
</detail>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<fileResource exportedWithPermissions="false" dataFile="StatesAndDowntimesDetails.data">
<folder>/icinga/templates/sub/Hostgroup</folder>
<name>StatesAndDowntimesDetails</name>
<version>3</version>
<label>StatesAndDowntimesDetails</label>
<creationDate>2016-10-12T23:43:25.741+02:00</creationDate>
<updateDate>2016-10-13T00:19:24.185+02:00</updateDate>
<fileType>jrxml</fileType>
</fileResource>
<?xml version="1.0" encoding="UTF-8"?>
<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="HG_SaD_Overview" language="groovy" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="e675bcd9-2100-4a05-892b-4c6dea9a1eb8">
<property name="ireport.zoom" value="1.1269722013523666"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="ireport.jasperserver.reportUnit" value="/icinga/reports/hostgroup/StatehistoryofaselectedServiceinagiventime_1"/>
<property name="ireport.jasperserver.url" value="http://192.168.122.153:8080/jasperserver/services/repository"/>
<import value="org.icinga.reporting.DateHelper"/>
<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>
</parameter>
<parameter name="p_hostgroup_object_id" class="java.lang.Integer"/>
<parameter name="p_date_start" class="java.sql.Timestamp">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="p_date_end" class="java.sql.Timestamp">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="p_timeperiod" class="java.lang.String"/>
<parameter name="p_final_date_start" class="java.sql.Timestamp" isForPrompting="false">
<defaultValueExpression><![CDATA[$P{p_timeperiod} == "last_week" ? DateHelper.getLastWeekStart() : $P{p_timeperiod} == "last_month" ? DateHelper.getLastMonthStart() : $P{p_timeperiod} == "last_year" ? DateHelper.getLastYearStart() : $P{p_date_start}]]></defaultValueExpression>
</parameter>
<parameter name="p_final_date_end" class="java.sql.Timestamp" isForPrompting="false">
<defaultValueExpression><![CDATA[$P{p_timeperiod} == "last_week" ? DateHelper.getLastWeekEnd() : $P{p_timeperiod} == "last_month" ? DateHelper.getLastMonthEnd() : $P{p_timeperiod} == "last_year" ? DateHelper.getLastYearEnd() : $P{p_date_end}]]></defaultValueExpression>
</parameter>
<parameter name="servicesTrue" class="java.lang.Boolean"/>
<parameter name="p_overview" class="java.lang.Boolean">
<defaultValueExpression><![CDATA[false]]></defaultValueExpression>
</parameter>
<parameter name="p_debug" class="java.lang.Boolean">
<defaultValueExpression><![CDATA[false]]></defaultValueExpression>
</parameter>
<parameter name="servername" class="java.lang.String">
<defaultValueExpression><![CDATA["<SETSERVERNAMEinREPORT>"]]></defaultValueExpression>
</parameter>
<parameter name="addRESTLink" class="java.lang.Boolean"/>
<queryString>
<![CDATA[select a.host_object_id,
c.name1,
b.alias
from icinga_hostgroup_members a,
icinga_hostgroups b,
icinga_objects c
where a.hostgroup_id = b.hostgroup_id
and c.object_id = a.host_object_id
and b.hostgroup_object_id = $P{p_hostgroup_object_id}]]>
</queryString>
<field name="name1" class="java.lang.String"/>
<field name="name2" class="java.lang.String"/>
<field name="host_object_id" class="java.lang.Integer"/>
<field name="alias" class="java.lang.String"/>
<detail>
<band height="14" splitType="Stretch">
<printWhenExpression><![CDATA[$P{p_overview}]]></printWhenExpression>
<subreport>
<reportElement x="2" y="0" width="552" height="14" uuid="ffeb284f-97dc-49d1-9d8c-2bdf75d0f62f"/>
<subreportParameter name="p_final_date_start">
<subreportParameterExpression><![CDATA[$P{p_final_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="SUBREPORT_DIR">
<subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_host_object_id">
<subreportParameterExpression><![CDATA[$F{host_object_id}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_final_date_end">
<subreportParameterExpression><![CDATA[$P{p_final_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_debug">
<subreportParameterExpression><![CDATA[$P{p_debug}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_overview">
<subreportParameterExpression><![CDATA[$P{p_overview}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_timeperiod">
<subreportParameterExpression><![CDATA[$P{p_timeperiod}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_end">
<subreportParameterExpression><![CDATA[$P{p_date_end}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="p_date_start">
<subreportParameterExpression><![CDATA[$P{p_date_start}]]></subreportParameterExpression>
</subreportParameter>
<subreportParameter name="servicesTrue">
<subreportParameterExpression><![CDATA[$P{servicesTrue}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
<subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "host/stateHistoryAndDowntimesHost"]]></subreportExpression>
</subreport>
</band>
</detail>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<fileResource exportedWithPermissions="false" dataFile="StatesAndDowntimesOverview.data">
<folder>/icinga/templates/sub/Hostgroup</folder>
<name>StatesAndDowntimesOverview</name>
<version>3</version>
<label>StatesAndDowntimesOverview</label>
<creationDate>2016-10-12T23:43:01.041+02:00</creationDate>
<updateDate>2016-10-13T00:19:29.290+02:00</updateDate>
<fileType>jrxml</fileType>
</fileResource>
......@@ -5,7 +5,7 @@
<version>0</version>
<label>stateHistoryAndDowntimesHost</label>
<description>stateHistoryAndDowntimesHost</description>
<creationDate>2016-09-27T22:51:28.060+02:00</creationDate>
<creationDate>2016-09-28T00:45:36.568+02:00</creationDate>
<updateDate>2016-09-27T20:18:37.759+02:00</updateDate>
<fileType>jrxml</fileType>
</fileResource>
......@@ -3,7 +3,7 @@
<parent>/icinga/templates/sub</parent>
<name>service</name>
<label>Service</label>
<creationDate>2016-09-27T22:50:06.400+02:00</creationDate>
<creationDate>2016-09-28T00:45:28.661+02:00</creationDate>
<updateDate>2011-11-08T11:53:04.845+01:00</updateDate>
<resource>activityInGivenTime</resource>
<resource>allNotificationsInGivenTime</resource>
......
<?xml version="1.0" encoding="UTF-8"?>
<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 state history Report" language="groovy" pageWidth="555" pageHeight="842" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="33cac294-e038-49a3-82ea-514eb21556ce">
<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="HG_SaD_ServiceCalc" language="groovy" pageWidth="555" pageHeight="842" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="33cac294-e038-49a3-82ea-514eb21556ce">
<property name="ireport.zoom" value="1.7715610000000022"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
......@@ -29,6 +29,16 @@
</parameter>
<queryString>
<![CDATA[SELECT
0 AS ID,
0 as last_hard_state,
'0000-00-00 00:00:00' AS START,
$P{p_date_start} AS END,
$P{p_date_start} AS SORT,
0 as state,
"OK -" as output ,
1 AS type
FROM icinga_statehistory limit 1
UNION SELECT
statehistory_id AS ID,
last_hard_state,
'0000-00-00 00:00:00' AS START,
......@@ -38,7 +48,8 @@
output,
1 AS type
FROM icinga_statehistory
WHERE object_id = '102' and state_time BETWEEN $P{p_date_start} AND $P{p_date_end} AND state_type = 1
WHERE object_id = $P{p_service_object_id} and state_time BETWEEN $P{p_date_start} AND $P{p_date_end} AND state_type = 1
UNION SELECT
downtimehistory_id AS ID,
0 AS last_hard_state,
......@@ -52,7 +63,7 @@ FROM icinga_downtimehistory
WHERE object_id in ($P{p_host_object_id},$P{p_service_object_id}) and (scheduled_end_time BETWEEN $P{p_date_start} AND $P{p_date_end} or scheduled_start_time BETWEEN $P{p_date_start} AND $P{p_date_end})
order by SORT;]]>
</queryString>
<field name="ID" class="java.math.BigInteger"/>
<field name="ID" class="java.lang.Long"/>
<field name="last_hard_state" class="java.lang.Long">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
......@@ -385,8 +396,14 @@ $V{lastTime}<$V{dt_active_start}?true:false]]></variableExpression>
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[($V{lastReportState}==0
? $V{DurationOK}+(($P{p_date_end}.getTime()-$V{lastReportTime}.getTime())/1000)
: $V{DurationOK}
? ($V{DurationOK}<=0
? (($P{p_date_end}.getTime()- $P{p_date_start}.getTime())/1000)
: $V{DurationOK}+(($P{p_date_end}.getTime()-$V{lastReportTime}.getTime())/1000)
)
: ($V{DurationOK}<=0
? (($P{p_date_end}.getTime()- $P{p_date_start}.getTime())/1000)
: $V{DurationOK}
)
)/3600]]></textFieldExpression>
</textField>
</band>
......
......@@ -2,9 +2,9 @@
<fileResource exportedWithPermissions="false" dataFile="stateHistoryAndDowntimes.data">
<folder>/icinga/templates/sub/service</folder>
<name>stateHistoryAndDowntimes</name>
<version>0</version>
<version>3</version>
<label>stateHistoryAndDowntimes</label>
<creationDate>2016-09-27T22:51:13.769+02:00</creationDate>
<updateDate>2016-09-27T20:16:36.405+02:00</updateDate>
<creationDate>2016-09-28T00:45:37.893+02:00</creationDate>
<updateDate>2016-10-13T01:00:32.839+02:00</updateDate>
<fileType>jrxml</fileType>
</fileResource>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment