Shirly Radco has uploaded a new change for review. Change subject: reports: dr10 report - added comments to queries ......................................................................
reports: dr10 report - added comments to queries Changed the code structure so it will be more readable and added commets. Change-Id: I0a281c2c3e446dbcba37d5974560055d537e8a44 Signed-off-by: Shirly Radco <sra...@redhat.com> --- M packaging/ovirt-reports/resources/reports_resources/embedded_reports/webadmin_dashboards/system_dashboard/jrxmls/system_host_resources_status_dr10_jrxml.data 1 file changed, 32 insertions(+), 11 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-reports refs/changes/12/27912/1 diff --git a/packaging/ovirt-reports/resources/reports_resources/embedded_reports/webadmin_dashboards/system_dashboard/jrxmls/system_host_resources_status_dr10_jrxml.data b/packaging/ovirt-reports/resources/reports_resources/embedded_reports/webadmin_dashboards/system_dashboard/jrxmls/system_host_resources_status_dr10_jrxml.data index 12d5e8c..d87454a 100644 --- a/packaging/ovirt-reports/resources/reports_resources/embedded_reports/webadmin_dashboards/system_dashboard/jrxmls/system_host_resources_status_dr10_jrxml.data +++ b/packaging/ovirt-reports/resources/reports_resources/embedded_reports/webadmin_dashboards/system_dashboard/jrxmls/system_host_resources_status_dr10_jrxml.data @@ -1,22 +1,43 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 5.5.0--> <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="system_host_resources_status_dr10" language="groovy" pageWidth="534" pageHeight="35" columnWidth="534" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" resourceBundle="ovirt_reports_bundle" whenResourceMissingType="Error" uuid="a0a3c234-a3fd-4786-89de-68c045ae2e28"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> - <property name="ireport.jasperserver.reportUnit" value="/reports_resources/webadmin_dashboards/ce/system_dashboard"/> - <property name="ireport.jasperserver.url" value="http://localhost:8080/jasperserver-pro/services/repository"/> - <queryString> - <![CDATA[SELECT 100 - (cpu_usage_percent_avg + memory_usage_percent_avg) / 2 as average_resources_not_used -FROM (SELECT AVG(cpu_usage_percent) AS cpu_usage_percent_avg, AVG(memory_usage_percent) AS memory_usage_percent_avg - FROM v3_5_statistics_hosts_resources_usage_samples - INNER JOIN v3_5_latest_configuration_hosts ON (v3_5_latest_configuration_hosts.host_id = v3_5_statistics_hosts_resources_usage_samples.host_id) - WHERE v3_5_statistics_hosts_resources_usage_samples.host_status = 1) as average_resources]]> + <property name="ireport.jasperserver.url" value="http://localhost:8080/jasperserver-pro/"/> + <property name="ireport.jasperserver.report.resource" value="/reports_resources/embedded_reports/webadmin_dashboards/system_dashboard/jrxmls/system_host_resources_status_dr10_jrxml"/> + <queryString language="SQL"> + <![CDATA[-- DR10 - This query returns the average +-- hosts resources ( cpu + memory ) that are unused + +SELECT + 100 - + ( + cpu_usage_percent_avg + + memory_usage_percent_avg + ) / + 2 + AS average_resources_not_used +FROM ( + SELECT + AVG ( cpu_usage_percent ) AS cpu_usage_percent_avg, + AVG ( memory_usage_percent ) AS memory_usage_percent_avg + FROM v3_5_statistics_hosts_resources_usage_samples + INNER JOIN v3_5_latest_configuration_hosts + ON ( + v3_5_latest_configuration_hosts.host_id = + v3_5_statistics_hosts_resources_usage_samples.host_id + ) + WHERE + -- Here we filter only active hosts + v3_5_statistics_hosts_resources_usage_samples.host_status = 1 +) AS average_resources]]> </queryString> <field name="average_resources_not_used" class="java.math.BigDecimal"/> <summary> <band height="35" splitType="Stretch"> <textField> - <reportElement uuid="95e48ba3-940f-4690-bd0f-1014386424c0" x="0" y="0" width="370" height="35" forecolor="#333333"/> + <reportElement x="0" y="0" width="370" height="35" forecolor="#333333" uuid="95e48ba3-940f-4690-bd0f-1014386424c0"/> <textElement verticalAlignment="Middle" markup="html"> <font fontName="SansSerif" size="15"/> </textElement> @@ -24,14 +45,14 @@ <hyperlinkTooltipExpression><![CDATA["Calculates averages of CPU and memory percent for all hosts and averages the two values. Displays check mark if resources not used is over 60%, otherwise displays X mark.\nThis query is calculated from the host statistics samples view for the system."]]></hyperlinkTooltipExpression> </textField> <image> - <reportElement uuid="9e37ef88-402d-4a9b-a796-96d877f532e2" x="370" y="10" width="17" height="15"> + <reportElement x="370" y="10" width="17" height="15" uuid="9e37ef88-402d-4a9b-a796-96d877f532e2"> <printWhenExpression><![CDATA[$F{average_resources_not_used} == null || $F{average_resources_not_used} > 60]]></printWhenExpression> </reportElement> <imageExpression><![CDATA["repo:/reports_resources/check-mark.jpg"]]></imageExpression> <hyperlinkTooltipExpression><![CDATA["Calculates averages of CPU and memory percent for all hosts and averages the two values. Displays check mark if resources not used is over 60%, otherwise displays X mark.\nThis query is calculated from the host statistics samples view for the system."]]></hyperlinkTooltipExpression> </image> <image> - <reportElement uuid="b1e68435-8513-4c70-b119-5623c6107245" x="370" y="10" width="17" height="15"> + <reportElement x="370" y="10" width="17" height="15" uuid="b1e68435-8513-4c70-b119-5623c6107245"> <printWhenExpression><![CDATA[$F{average_resources_not_used} != null && $F{average_resources_not_used} <= 60]]></printWhenExpression> </reportElement> <imageExpression><![CDATA["repo:/reports_resources/x-mark.jpg"]]></imageExpression> -- To view, visit http://gerrit.ovirt.org/27912 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a281c2c3e446dbcba37d5974560055d537e8a44 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-reports Gerrit-Branch: master Gerrit-Owner: Shirly Radco <sra...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches