← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5776: Validation analysis, removed function for running data mart when looking at aggregate validation.

 

------------------------------------------------------------
revno: 5776
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-01-22 07:34:56 +0100
message:
  Validation analysis, removed function for running data mart when looking at aggregate validation.
modified:
  dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/RunValidationAction.java
  dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/runValidation.js
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.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-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/RunValidationAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/RunValidationAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/RunValidationAction.java	2012-01-22 06:34:56 +0000
@@ -27,19 +27,14 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.system.util.ConversionUtils.getIdentifiers;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.Grid;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.datamart.DataMartService;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
@@ -90,13 +85,6 @@
         this.organisationUnitService = organisationUnitService;
     }
 
-    private DataMartService dataMartService;
-
-    public void setDataMartService( DataMartService dataMartService )
-    {
-        this.dataMartService = dataMartService;
-    }
-
     private PeriodService periodService;
 
     public void setPeriodService( PeriodService periodService )
@@ -108,13 +96,6 @@
     // Input/output
     // -------------------------------------------------------------------------
 
-    private boolean doDataMart;
-
-    public void setDoDataMart( boolean doDataMart )
-    {
-        this.doDataMart = doDataMart;
-    }
-
     private Integer organisationUnitId;
     
     public void setOrganisationUnitId( Integer organisationUnitId )
@@ -209,17 +190,7 @@
                 periodService.getPeriodsBetweenDates( format.parseDate( startDate ), format.parseDate( endDate ) ), format ) );
             
             log.info( "Number of periods: " + periods.size() + ", number of organisation units: " + organisationUnits.size() );
-            
-            if ( doDataMart )
-            {
-                log.info( "Generating datamart" );
-                
-                Collection<DataElement> dataElements = validationRuleService.getDataElementsInValidationRules();
-                
-                dataMartService.export( getIdentifiers( DataElement.class, dataElements ), new HashSet<Integer>(), 
-                    getIdentifiers( Period.class, periods ), getIdentifiers( OrganisationUnit.class, organisationUnits ) );
-            }
-            
+                        
             if ( validationRuleGroupId == -1 )
             {
                 log.info( "Validating aggregate data for all rules" );

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml	2012-01-05 20:39:23 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/META-INF/dhis/beans.xml	2012-01-22 06:34:56 +0000
@@ -191,9 +191,6 @@
     <property name="organisationUnitService">
       <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService" />
     </property>
-    <property name="dataMartService">
-      <ref bean="org.hisp.dhis.datamart.DataMartService" />
-    </property>
     <property name="periodService">
       <ref bean="org.hisp.dhis.period.PeriodService" />
     </property>

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/runValidation.js'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/runValidation.js	2011-09-08 17:31:21 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/javascript/runValidation.js	2012-01-22 06:34:56 +0000
@@ -2,7 +2,6 @@
 var endDate;
 var validationRuleGroupId;
 var aggregate;
-var doDataMart;
 var organisationUnitId;
 
 function organisationUnitSelected( ids )
@@ -35,11 +34,9 @@
         endDate = getFieldValue( 'endDate' );
         validationRuleGroupId = $( '#validationRuleGroupId' ).val();
         aggregate = $( '#aggregate' ).val();
-        doDataMart = $( '#doDataMart' ).val();
 
         var url = 'runValidationAction.action?organisationUnitId=' + organisationUnitId + '&startDate=' + startDate
-                + '&endDate=' + endDate + '&validationRuleGroupId=' + validationRuleGroupId + '&aggregate=' + aggregate
-                + '&doDataMart=' + doDataMart;
+                + '&endDate=' + endDate + '&validationRuleGroupId=' + validationRuleGroupId + '&aggregate=' + aggregate;
 
         $.get( url, function( data )
         {
@@ -62,8 +59,7 @@
     setHeaderWaitMessage( i18n_analysing_please_wait );
 
     var url = 'runValidationAction.action?organisationUnitId=' + orgUnitId + '&startDate=' + startDate + '&endDate='
-            + endDate + '&validationRuleGroupId=' + validationRuleGroupId + '&aggregate=' + aggregate + '&doDataMart='
-            + doDataMart;
+            + endDate + '&validationRuleGroupId=' + validationRuleGroupId + '&aggregate=' + aggregate;
 
     $.get( url, function( data )
     {
@@ -98,11 +94,9 @@
     if ( aggregate == 'true' )
     {
         $( 'span#info' ).html( i18n_aggregate_data_info );
-        $( '#doDataMart' ).removeAttr( 'disabled' );
     } else
     {
         $( 'span#info' ).html( i18n_captured_data_info );
-        $( '#doDataMart' ).attr( 'disabled', 'disabled' );
     }
 }
 

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm	2011-03-18 14:58:26 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/runValidationForm.vm	2012-01-22 06:34:56 +0000
@@ -59,17 +59,6 @@
     	</td>
     </tr>
     <tr>
-    	<td>
-    		<label for="doDataMart">$i18n.getString( "method" )</label>
-	    </td>
-    	<td>
-			<select id="doDataMart" name="doDataMart" style="width:20em" disabled="disabled">
-				<option value="true">$i18n.getString( "get_updated_data" )</a>
-				<option value="false">$i18n.getString( "use_existing_data" )</a>
-			</select>
-		</td>
-	</tr>
-    <tr>
     	<td colspan="2"><span id="info">$i18n.getString( "captured_data_info" )</span></td>
     </tr>
     <tr>