dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06517
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2081: Using aggregation engine for charts. Means charts always have live data. Fixed problem with follo...
------------------------------------------------------------
revno: 2081
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Mon 2010-07-05 01:55:46 +0200
message:
Using aggregation engine for charts. Means charts always have live data. Fixed problem with follow up analysis.
removed:
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/CreateChartAction.java
added:
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followUpAnalysisForm.vm
modified:
dhis-2/dhis-services/dhis-service-reporting/pom.xml
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationMenu.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/viewAdministrator.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/minMaxValidation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/denum.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/GetAnalysisAction.java
dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/org/hisp/dhis/validationrule/i18n_module.properties
dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/expression.js
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/menu.vm
dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/pom.xml'
--- dhis-2/dhis-services/dhis-service-reporting/pom.xml 2010-04-27 15:04:10 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/pom.xml 2010-07-04 23:55:46 +0000
@@ -27,6 +27,10 @@
</dependency>
<dependency>
<groupId>org.hisp.dhis</groupId>
+ <artifactId>dhis-service-aggregationengine-default</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hisp.dhis</groupId>
<artifactId>dhis-service-core</artifactId>
</dependency>
<dependency>
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2010-07-01 10:08:55 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2010-07-04 23:55:46 +0000
@@ -47,12 +47,12 @@
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.analysis.UnivariateRealInterpolator;
import org.apache.commons.math.stat.regression.SimpleRegression;
+import org.hisp.dhis.aggregation.AggregationService;
import org.hisp.dhis.chart.Chart;
import org.hisp.dhis.chart.ChartService;
import org.hisp.dhis.chart.ChartStore;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.datamart.DataMartService;
import org.hisp.dhis.datavalue.DataValue;
import org.hisp.dhis.datavalue.DataValueService;
import org.hisp.dhis.i18n.I18nFormat;
@@ -109,13 +109,6 @@
this.chartStore = chartStore;
}
- private DataMartService dataMartService;
-
- public void setDataMartService( DataMartService dataMartService )
- {
- this.dataMartService = dataMartService;
- }
-
private PeriodService periodService;
public void setPeriodService( PeriodService periodService )
@@ -136,6 +129,13 @@
{
this.minMaxDataElementService = minMaxDataElementService;
}
+
+ private AggregationService aggregationService;
+
+ public void setAggregationService( AggregationService aggregationService )
+ {
+ this.aggregationService = aggregationService;
+ }
// -------------------------------------------------------------------------
// ChartService implementation
@@ -448,7 +448,8 @@
for ( Period period : chart.getAllPeriods() )
{
- final Double value = dataMartService.getAggregatedValue( indicator, period, selectedOrganisationUnit );
+ //final Double value = dataMartService.getAggregatedValue( indicator, period, selectedOrganisationUnit );
+ final Double value = aggregationService.getAggregatedIndicatorValue( indicator, period.getStartDate(), period.getEndDate(), selectedOrganisationUnit );
regularDataSet.addValue( value != null ? value : 0, indicator.getShortName(), chart.getFormat().formatPeriod( period ) );
@@ -487,7 +488,8 @@
for ( OrganisationUnit unit : chart.getOrganisationUnits() )
{
- final Double value = dataMartService.getAggregatedValue( indicator, selectedPeriod, unit );
+ //final Double value = dataMartService.getAggregatedValue( indicator, selectedPeriod, unit );
+ final Double value = aggregationService.getAggregatedIndicatorValue( indicator, selectedPeriod.getStartDate(), selectedPeriod.getEndDate(), unit );
regularDataSet.addValue( value != null ? value : 0, indicator.getShortName(), unit.getShortName() );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-06-23 17:50:25 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-07-04 23:55:46 +0000
@@ -92,8 +92,8 @@
<bean id="org.hisp.dhis.chart.ChartService"
class="org.hisp.dhis.chart.impl.DefaultChartService">
- <property name="dataMartService"
- ref="org.hisp.dhis.datamart.DataMartService"/>
+ <property name="aggregationService"
+ ref="org.hisp.dhis.aggregation.AggregationService"/>
<property name="chartStore"
ref="org.hisp.dhis.chart.ChartStore"/>
<property name="periodService"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationMenu.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationMenu.vm 2010-04-12 08:28:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationMenu.vm 2010-07-04 23:55:46 +0000
@@ -1,5 +1,5 @@
-<a href="index.action"><h2>$i18n.getString( "case_aggragation" ) </h2></a>
+<a href="index.action"><h2>$i18n.getString( "case_aggregation" ) </h2></a>
<ul>
<li><a href="caseAggregationForm.action">$i18n.getString( "case_aggregation" )</a></li>
</ul>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css 2010-07-04 19:18:12 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css 2010-07-04 23:55:46 +0000
@@ -223,7 +223,7 @@
#leftBar
{
background-color: #35699f;
- height: 474px;
+ height: 535px;
width: 235px;
float: left;
position: absolute;
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/viewAdministrator.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/viewAdministrator.vm 2010-07-02 10:12:52 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/viewAdministrator.vm 2010-07-04 23:55:46 +0000
@@ -7,7 +7,6 @@
#introListImgItem( "listAllExcelItemGroup.action" "excel_item" "program" )
#introListImgItem( "listAllExcelTemplates.action" "excel_template_management" , "excel")
#introListImgItem( "javascript: cleanUp();" "clean_up" "clean-up")
-
</ul>
<script>
function go(action){
@@ -21,7 +20,6 @@
}
function cleanUpCompleted( xmlObject ){
- setMessage(xmlObject.firstChild.nodeValue);
+ setHeaderDelayMessage(xmlObject.firstChild.nodeValue);
}
</script>
-<span id="message" style="top:100px;right:5px;position:fixed;width:200px;z-index:10002" onclick="hideById(this.id);"></span>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties 2010-07-03 19:36:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties 2010-07-04 23:55:46 +0000
@@ -210,4 +210,15 @@
DataSet = Data Set
DataElementGroup = Data Set Group
OrganisationUnit = Organisation Unit
-OrganisationUnitGroup = Organisation Unit Group
\ No newline at end of file
+OrganisationUnitGroup = Organisation Unit Group
+available_dataset = Available data sets
+select_all_at_level = Select all at level
+unselect_all_at_level = Unselect all at level
+unselect_all = Unselect all
+select_all_in_group = Select all in group
+unselect_all_in_group = Unselect all in group
+loading = Loading
+level_must_be_int = Level must be a number
+not_choose_dataset = Please select a data set
+not_choose_organisation = Please select an organsisation unit
+generate = Generate
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/minMaxValidation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/minMaxValidation.vm 2010-06-01 10:24:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/minMaxValidation.vm 2010-07-04 23:55:46 +0000
@@ -24,7 +24,7 @@
</script>
<input type="hidden" id="curLocaleCode" value="$locale.getLanguage()_$locale.getCountry()"/>
-<h3>$i18n.getString( "min_max_validation" )</h3>
+<h3>$i18n.getString( "min_max_value_generation" )</h3>
<form id="minMaxGeneratingForm" action="getMinMaxValidationParams.action" method="POST">
<table>
<tr>
@@ -41,14 +41,14 @@
</select></td>
<td style="width:10px "> </td>
- <td><input type="button" value="$i18n.getString( "select_all_at_level_min_max" )" onclick="selectAllAtLevel()" style="width:12em">
+ <td><input type="button" value="$i18n.getString( "select_all_at_level" )" onclick="selectAllAtLevel()" style="width:12em">
<select id="levelList" name="levelList" style="width:12em">
#foreach( $lev in $levels )
<option value="$lev.level" #if ( $level == $lev.level )selected="selected"#end>$encoder.htmlEncode( $lev.name )</option>
#end
</select>
- <input type="button" value="$i18n.getString( "unselect_all_at_level_min_max" )" onclick="unselectAllAtLevel()" style="width:12em">
- <input type="button" value="$i18n.getString( "unselect_all_min_max" )" onclick="unselectAll()" style="width:12em">
+ <input type="button" value="$i18n.getString( "unselect_all_at_level" )" onclick="unselectAllAtLevel()" style="width:12em">
+ <input type="button" value="$i18n.getString( "unselect_all" )" onclick="unselectAll()" style="width:12em">
</td>
</tr>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm 2010-06-15 03:12:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElement.vm 2010-07-04 23:55:46 +0000
@@ -4,7 +4,7 @@
<table class="mainPageTable" >
<tr>
<td style="vertical-align:top">
- <table>
+ <table width="100%">
<tr>
<td>$i18n.getString( "filter_by_name" ): <form style="display:inline" action="none" onsubmit="return false"><div style="inline"><input type="text" onkeyup="filterValues( this.value )"></div></form></td>
<td>
@@ -29,7 +29,7 @@
</select>
</div>
</td>
- <td colspan="5" style="text-align:right">
+ <td style="text-align:right">
<input type="button" value="$i18n.getString( "get_pdf" )" onclick="window.location.href='exportToPdf.action?type=dataelement'" style="width:80px">
<input type="button" value="$i18n.getString( "sort" )" onclick="window.location.href='showSortDataElementForm.action'" style="width:80px">
#if ( $dataDictionaryMode == "extended" )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/denum.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/denum.js 2010-06-14 12:47:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/denum.js 2010-07-04 23:55:46 +0000
@@ -171,7 +171,8 @@
var url = "editDenum.action?type=" + type + "&formula=" + formula +
"&description=" + description + "&aggregationOperator=" + aggregationOperator;
- var dialog = window.open( url, "_blank", "directories=no, height=560, width=790, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes" );
+ var dialog = window.open( url, "_blank",
+ "directories=no, height=600, width=790, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes" );
}
function insertText( inputAreaName, inputText, radioGroupName )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml 2010-07-02 10:12:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/struts.xml 2010-07-04 23:55:46 +0000
@@ -22,7 +22,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-organisationunit/organisationUnit.vm</param>
<param name="menu">/dhis-web-maintenance-organisationunit/menuWithTree.vm</param>
- <param name="menuTreeHeight">321</param>
+ <param name="menuTreeHeight">384</param>
<param name="javascripts">
../dhis-web-commons/ouwt/ouwt.js,
javascript/organisationUnit.js
@@ -126,7 +126,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-organisationunit/organisationUnitGroup.vm</param>
<param name="menu">/dhis-web-maintenance-organisationunit/menu.vm</param>
- <param name="menuTreeHeight">321</param>
+ <param name="menuTreeHeight">384</param>
<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/organisationUnitGroup.js</param>
<interceptor-ref name="organisationUnitTreeStack" />
</action>
@@ -239,7 +239,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-organisationunit/organisationUnitGroupSet.vm</param>
<param name="menu">/dhis-web-maintenance-organisationunit/menu.vm</param>
- <param name="menuTreeHeight">321</param>
+ <param name="menuTreeHeight">384</param>
<param name="javascripts">javascript/organisationUnitGroupSet.js</param>
</action>
@@ -313,7 +313,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-organisationunit/hierarchyOperations.vm</param>
<param name="menu">/dhis-web-maintenance-organisationunit/menuWithTree.vm</param>
- <param name="menuTreeHeight">321</param>
+ <param name="menuTreeHeight">384</param>
<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/hierarchyOperations.js</param>
<interceptor-ref name="organisationUnitTreeStack" />
<param name="requiredAuthorities">F_ORGANISATIONUNIT_MOVE</param>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2010-07-02 02:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2010-07-04 23:55:46 +0000
@@ -89,8 +89,8 @@
jasper = Jasper Reports
intro_user_settings = Customize the system with user specific settings for locale, sort order, display property, style and more.
intro_system_settings = Customize the system behavior with regard to reporting framework, start page, title, flag and more.
-disable_dataentry_when_dataset_completed = Disable data entry when data set completed.
+disable_dataentry_when_dataset_completed = Disable data entry when data set completed
max_attempts = Max number of login attempts
lockout_timeframe = Lockout minutes after max number of login attempts
data_analysis_factor = Data analysis std dev factor
-auto_save_data_entry_form = Auto-save data entry Form
+auto_save_data_entry_form = Auto-save data entry form
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml 2010-07-02 10:12:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml 2010-07-04 23:55:46 +0000
@@ -21,6 +21,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-user/user.vm</param>
<param name="menu">/dhis-web-maintenance-user/orgunitMenu.vm</param>
+ <param name="menuTreeHeight">404</param>
<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/user.js,javascript/filterTable.js</param>
<interceptor-ref name="organisationUnitTreeStack"/>
</action>
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/CreateChartAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/CreateChartAction.java 2010-06-25 10:31:20 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/CreateChartAction.java 1970-01-01 00:00:00 +0000
@@ -1,116 +0,0 @@
-package org.hisp.dhis.reporting.chart.action;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import static org.hisp.dhis.datamart.DataMartInternalProcess.PROCESS_TYPE;
-import static org.hisp.dhis.util.InternalProcessUtil.PROCESS_KEY_REPORT;
-import static org.hisp.dhis.util.InternalProcessUtil.setCurrentRunningProcess;
-
-import java.util.HashSet;
-
-import org.amplecode.cave.process.ProcessCoordinator;
-import org.amplecode.cave.process.ProcessExecutor;
-import org.hisp.dhis.chart.Chart;
-import org.hisp.dhis.chart.ChartService;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.datamart.DataMartExport;
-import org.hisp.dhis.datamart.DataMartInternalProcess;
-import org.hisp.dhis.user.CurrentUserService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * This class exports the relevant data for the chart to datamart.
- *
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class CreateChartAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private ProcessCoordinator processCoordinator;
-
- public void setProcessCoordinator( ProcessCoordinator processCoordinator )
- {
- this.processCoordinator = processCoordinator;
- }
-
- private CurrentUserService currentUserService;
-
- public void setCurrentUserService( CurrentUserService currentUserService )
- {
- this.currentUserService = currentUserService;
- }
-
- private ChartService chartService;
-
- public void setChartService( ChartService chartService )
- {
- this.chartService = chartService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- Chart chart = chartService.getChart( id );
-
- String owner = currentUserService.getCurrentUsername();
-
- ProcessExecutor executor = processCoordinator.newProcess( PROCESS_TYPE, owner );
-
- DataMartInternalProcess process = (DataMartInternalProcess) executor.getProcess();
-
- DataMartExport export = new DataMartExport( null, new HashSet<DataElement>(), chart.getIndicators(), chart.getOrganisationUnits(), chart.getPeriods(), chart.getRelatives() );
-
- process.setExport( export );
-
- processCoordinator.requestProcessExecution( executor );
-
- setCurrentRunningProcess( PROCESS_KEY_REPORT, executor.getId() );
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-05-17 21:05:26 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-07-04 23:55:46 +0000
@@ -76,18 +76,7 @@
<property name="organisationUnitService"
ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
</bean>
-
- <bean id="org.hisp.dhis.reporting.chart.action.CreateChartAction"
- class="org.hisp.dhis.reporting.chart.action.CreateChartAction"
- scope="prototype">
- <property name="processCoordinator"
- ref="processCoordinator"/>
- <property name="currentUserService"
- ref="org.hisp.dhis.user.CurrentUserService"/>
- <property name="chartService"
- ref="org.hisp.dhis.chart.ChartService"/>
- </bean>
-
+
<bean id="org.hisp.dhis.reporting.chart.action.ViewChartAction"
class="org.hisp.dhis.reporting.chart.action.ViewChartAction"
scope="prototype">
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2010-03-17 06:25:32 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2010-07-04 23:55:46 +0000
@@ -179,6 +179,7 @@
please_wait= Please wait
view= View
chart= Chart
+view_chart = View chart
create_chart= Create chart
chart_dimension= Chart dimension
add_period_chart= Add period chart
@@ -186,8 +187,6 @@
create_indicator_by_period_chart= Create indicator by period chart
create_indicator_by_organisation_unit_chart= Create indicator by organisation unit chart
dimension= Dimension
-generate_datasource_and_view_chart= Generate datasource and view chart
-view_chart_based_on_existing_datasource= View chart based on existing datasource
category_option_combos= Category Option Combinations
hide_legend= Hide legend
vertical_category_labels= Vertical category labels
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2010-06-15 03:12:16 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2010-07-04 23:55:46 +0000
@@ -63,12 +63,7 @@
</action>
<!-- Chart -->
-
- <action name="createChart" class="org.hisp.dhis.reporting.chart.action.CreateChartAction">
- <result name="success" type="velocity-xml">/dhis-web-reporting/responseSuccess.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
+
<action name="saveChart" class="org.hisp.dhis.reporting.chart.action.SaveChartAction">
<result name="success" type="redirect">displayViewChartForm.action</result>
<param name="requiredAuthorities">F_CHART_ADD</param>
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js 2010-06-25 10:31:20 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/chart.js 2010-07-04 23:55:46 +0000
@@ -3,55 +3,6 @@
// View chart
// -----------------------------------------------------------------------------
-var tempChartId;
-
-function runAndViewChart( chartId )
-{
- setHeaderWaitMessage( i18n_please_wait );
-
- tempChartId = chartId;
-
- var request = new Request();
- request.setCallbackSuccess( runAndViewChartReceived );
- request.send( "createChart.action?id=" + chartId );
-}
-
-function runAndViewChartReceived( messageElement )
-{
- getChartStatus();
-}
-
-function getChartStatus()
-{
- var url = "getStatus.action";
-
- var request = new Request();
- request.setResponseTypeXML( "status" );
- request.setCallbackSuccess( chartStatusReceived );
- request.send( url );
-}
-
-function chartStatusReceived( xmlObject )
-{
- var statusMessage = getElementValue( xmlObject, "statusMessage" );
- var finished = getElementValue( xmlObject, "finished" );
-
- updateHeaderWaitMessage( statusMessage );
-
- if ( finished == "true" )
- {
- hideHeaderMessage();
-
- var url = "viewChart.action?id=" + tempChartId;
-
- viewChart( url );
- }
- else
- {
- setTimeout( "getChartStatus();", 2000 );
- }
-}
-
function viewChart( url )
{
window.open( url, "_blank", "directories=no, height=560, width=760, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes" );
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm 2010-06-15 03:12:16 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm 2010-07-04 23:55:46 +0000
@@ -18,7 +18,6 @@
<col width="20">
<col width="20">
<col width="20">
- <col width="20">
<thead>
<tr>
<th>$i18n.getString( "title" )</th>
@@ -29,8 +28,7 @@
#foreach ( $chart in $charts )
<tr id="tr${chart.id}">
<td onclick="showChartDetails( $chart.id )">$encoder.htmlEncode( $chart.title )</td>
- <td style="text-align:center"><a href="javascript:runAndViewChart( '$chart.id' )" title="$i18n.getString( "generate_datasource_and_view_chart" )"><img src="../images/open.png" alt="$i18n.getString( "generate_datasource_and_view_chart" )"></a></td>
- <td style="text-align:center"><a href="javascript:viewChart( 'viewChart.action?id=$chart.id' )" title="$i18n.getString( "view_chart_based_on_existing_datasource" )"><img src="../images/view_report.png" alt="$i18n.getString( "view_report_based_on_existing_datasource" )"></a></td>
+ <td style="text-align:center"><a href="javascript:viewChart( 'viewChart.action?id=$chart.id' )" title="$i18n.getString( "view_chart" )"><img src="../images/start_process.png" alt="$i18n.getString( "view_chart" )"></a></td>
<td style="text-align:center"><a href="displayAddChartForm.action?id=$chart.id&dimension=$chart.dimension" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a></td>
<td style="text-align:center"><a href="javascript:removeChart( $chart.id, '$encoder.jsEncode( $chart.title )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a></td>
<td style="text-align:center"><a href="javascript:showChartDetails( $chart.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a></td>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/GetAnalysisAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/GetAnalysisAction.java 2010-06-30 16:52:11 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/dataanalysis/GetAnalysisAction.java 2010-07-04 23:55:46 +0000
@@ -166,27 +166,29 @@
public String execute()
{
Set<DataElement> dataElements = new HashSet<DataElement>();
+ Collection<Period> periods = null;
+ OrganisationUnit unit = null;
if ( fromDate != null && toDate != null && dataSets != null && organisationUnit != null )
{
- Collection<Period> periods = periodService.getPeriodsBetweenDates( format.parseDate( fromDate ), format.parseDate( toDate ) ); //TODO improve
+ periods = periodService.getPeriodsBetweenDates( format.parseDate( fromDate ), format.parseDate( toDate ) ); //TODO improve
for ( String id : dataSets )
{
dataElements.addAll( dataSetService.getDataSet( Integer.parseInt( id ) ).getDataElements() );
}
- OrganisationUnit unit = organisationUnitService.getOrganisationUnit( organisationUnit );
+ unit = organisationUnitService.getOrganisationUnit( organisationUnit );
log.info( "From date: " + fromDate + ", To date: " + toDate + ", Organisation unit: " + unit + ", Std dev: " + standardDeviation + ", Key: " + key );
log.info( "Nr of data elements: " + dataElements.size() + " Nr of periods: " + periods.size() );
-
- DataAnalysisService service = serviceProvider.provide( key );
-
- if ( service != null )
- {
- dataValues = service.analyse( unit, dataElements, periods, standardDeviation );
- }
+ }
+
+ DataAnalysisService service = serviceProvider.provide( key );
+
+ if ( service != null ) // Follow-up analysis has no input params
+ {
+ dataValues = service.analyse( unit, dataElements, periods, standardDeviation );
}
return SUCCESS;
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/org/hisp/dhis/validationrule/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/org/hisp/dhis/validationrule/i18n_module.properties 2010-06-29 00:24:10 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/org/hisp/dhis/validationrule/i18n_module.properties 2010-07-04 23:55:46 +0000
@@ -167,3 +167,4 @@
periodtype = Periodtype
available_data_sets = Available data sets
selected_data_sets = Selected data sets
+analysing_please_wait = Analysing data, please wait
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml 2010-07-02 10:12:52 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml 2010-07-04 23:55:46 +0000
@@ -220,6 +220,13 @@
<interceptor-ref name="organisationUnitTreeStack"/>
</action>
+ <action name="viewFollowUpAnalysisForm" class="org.hisp.dhis.validationrule.action.NoAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">/dhis-web-validationrule/followUpAnalysisForm.vm</param>
+ <param name="menu">/dhis-web-validationrule/menu.vm</param>
+ <param name="javascripts"> javascript/dataAnalysis.js</param>
+ </action>
+
<action name="getAnalysis" class="org.hisp.dhis.validationrule.action.dataanalysis.GetAnalysisAction">
<result name="success" type="velocity">/dhis-web-validationrule/searchResult.vm</result>
</action>
@@ -230,7 +237,7 @@
</action>
<action name="markForFollowup" class="org.hisp.dhis.validationrule.action.dataanalysis.MarkForFollowupAction">
- <result name="success" type="velocity-xml">/dhis-web-validationrule/responseSuccess.vm</result>
+ <result name="success" type="velocity-xml">/dhis-web-validationrule/responseSuccess.vm</result>
</action>
</package>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2010-06-30 16:52:11 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/dataAnalysisForm.vm 2010-07-04 23:55:46 +0000
@@ -115,6 +115,8 @@
<span id="message"></span>
<script type="text/javascript">
+ var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
+
jQuery(document).ready(function(){
datePickerInRange( 'fromDate' , 'toDate' );
});
=== added file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followUpAnalysisForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followUpAnalysisForm.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/followUpAnalysisForm.vm 2010-07-04 23:55:46 +0000
@@ -0,0 +1,10 @@
+
+<span id="message"></span>
+
+<div id="analysisResult"></div>
+
+<script type="text/javascript">
+ var i18n_analysing_please_wait = '$encoder.jsEscape( $i18n.getString( "analysing_please_wait" ) , "'")';
+
+ getFollowUpAnalysis();
+</script>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm 2010-06-19 15:32:24 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/index.vm 2010-07-04 23:55:46 +0000
@@ -8,5 +8,5 @@
#introListImgItem( "viewAnalysisForm.action?key=stddevoutlier" "stddevoutlier_analysis" "validationanalysis" )
#introListImgItem( "viewAnalysisForm.action?key=minmaxoutlier" "minmaxoutlier_analysis" "validationanalysis" )
#introListImgItem( "viewAnalysisForm.action?key=gap" "gap_analysis" "validationanalysis" )
- #introListImgItem( "getAnalysis.action?key=followup" "followup_analysis" "validationanalysis" )
+ #introListImgItem( "viewFollowUpAnalysisForm.action" "followup_analysis" "validationanalysis" )
</ul>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js 2010-06-29 00:24:10 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/dataAnalysis.js 2010-07-04 23:55:46 +0000
@@ -10,7 +10,7 @@
{
if ( analysisFormIsValid() == true )
{
- setWaitMessage( "Analysing data, please wait..." );
+ setWaitMessage( i18n_analysing_please_wait );
var url = "getAnalysis.action" +
"?key=" + $( "#key" ).val() +
@@ -50,3 +50,16 @@
return true;
}
+
+function getFollowUpAnalysis()
+{
+ setWaitMessage( i18n_analysing_please_wait );
+
+ var url = "getAnalysis.action?key=followup";
+
+ $.get( url, function( data ) {
+ hideMessage();
+ $( "div#analysisResult" ).show();
+ $( "div#analysisResult" ).html( data );
+ } );
+}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/expression.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/expression.js 2010-06-14 12:47:51 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/expression.js 2010-07-04 23:55:46 +0000
@@ -27,9 +27,8 @@
"&textualExpression=" + textualExpression +
"&periodTypeName=" + periodTypeName ;
- var dialog = window.open( url, "_blank", "directories=no, \
- height=560, width=790, location=no, menubar=no, status=no, \
- toolbar=no, resizable=no");
+ var dialog = window.open( url, "_blank",
+ "directories=no, height=600, width=790, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes" );
}
function insertText( inputAreaName, inputText )
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/menu.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/menu.vm 2009-12-24 14:47:25 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/menu.vm 2010-07-04 23:55:46 +0000
@@ -11,5 +11,5 @@
<li><a href="viewAnalysisForm.action?key=stddevoutlier">$i18n.getString( "stddevoutlier_analysis" ) </a></li>
<li><a href="viewAnalysisForm.action?key=minmaxoutlier">$i18n.getString( "minmaxoutlier_analysis" ) </a></li>
<li><a href="viewAnalysisForm.action?key=gap">$i18n.getString( "gap_analysis" ) </a></li>
- <li><a href="getAnalysis.action?key=followup">$i18n.getString( "followup_analysis" ) </a></li>
+ <li><a href="viewFollowUpAnalysisForm.action">$i18n.getString( "followup_analysis" ) </a></li>
</ul>
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm 2010-06-29 00:24:10 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/searchResult.vm 2010-07-04 23:55:46 +0000
@@ -7,7 +7,7 @@
#else
-<span id="info">$dataValues.size() $i18n.getString( "values_found" )</span>
+<span id="info">$!dataValues.size() $i18n.getString( "values_found" )</span>
<input type="button" onclick="window.location.href='viewAnalysisForm.action?key=$!{key}'" value="Back" style="width:120px"><br><br>