=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js 2011-09-16 15:55:47 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/validationRules.js 2011-10-01 09:05:47 +0000 @@ -410,5 +410,10 @@ "rangelength" : [ 2, 230 ], "alphanumericwithbasicpuncspaces" : true } - } + }, + "dataMart" : { + "name" : { + "required": true + } + } }; === modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/GetOptionsAction.java' --- dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/GetOptionsAction.java 2011-05-05 21:15:45 +0000 +++ dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/GetOptionsAction.java 2011-10-01 09:05:47 +0000 @@ -35,15 +35,9 @@ import java.util.List; import org.hisp.dhis.dataelement.DataElement; -import org.hisp.dhis.dataelement.DataElementGroup; -import org.hisp.dhis.dataelement.DataElementService; -import org.hisp.dhis.dataelement.comparator.DataElementGroupNameComparator; import org.hisp.dhis.datamart.DataMartExport; import org.hisp.dhis.datamart.DataMartService; import org.hisp.dhis.indicator.Indicator; -import org.hisp.dhis.indicator.IndicatorGroup; -import org.hisp.dhis.indicator.IndicatorService; -import org.hisp.dhis.indicator.comparator.IndicatorGroupNameComparator; import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitLevel; @@ -53,7 +47,6 @@ import org.hisp.dhis.period.PeriodService; import org.hisp.dhis.period.PeriodType; import org.hisp.dhis.period.comparator.PeriodComparator; -import org.hisp.dhis.system.filter.AggregatableDataElementFilter; import org.hisp.dhis.system.filter.PastAndCurrentPeriodFilter; import org.hisp.dhis.system.util.FilterUtils; @@ -70,20 +63,6 @@ // Dependencies // ------------------------------------------------------------------------- - private IndicatorService indicatorService; - - public void setIndicatorService( IndicatorService indicatorService ) - { - this.indicatorService = indicatorService; - } - - private DataElementService dataElementService; - - public void setDataElementService( DataElementService dataElementService ) - { - this.dataElementService = dataElementService; - } - private PeriodService periodService; public void setPeriodService( PeriodService periodService ) @@ -150,34 +129,6 @@ // Output // ------------------------------------------------------------------------- - private List dataElements; - - public List getDataElements() - { - return dataElements; - } - - private List dataElementGroups; - - public List getDataElementGroups() - { - return dataElementGroups; - } - - private List indicators; - - public List getIndicators() - { - return indicators; - } - - private List indicatorGroups; - - public List getIndicatorGroups() - { - return indicatorGroups; - } - private List organisationUnits; public List getOrganisationUnits() @@ -284,53 +235,6 @@ public String execute() throws Exception { - // --------------------------------------------------------------------- - // Data element - // --------------------------------------------------------------------- - - dataElements = new ArrayList( dataElementService.getAllDataElements() ); - - Collections.sort( dataElements, dataElementComparator ); - - displayPropertyHandler.handle( dataElements ); - - FilterUtils.filter( dataElements, new AggregatableDataElementFilter() ); - - // --------------------------------------------------------------------- - // Data element group - // --------------------------------------------------------------------- - - dataElementGroups = new ArrayList( dataElementService.getAllDataElementGroups() ); - - Collections.sort( dataElementGroups, new DataElementGroupNameComparator() ); - - // --------------------------------------------------------------------- - // Indicator - // --------------------------------------------------------------------- - - indicators = new ArrayList( indicatorService.getAllIndicators() ); - - Collections.sort( indicators, indicatorComparator ); - - displayPropertyHandler.handle( indicators ); - - // --------------------------------------------------------------------- - // Indicator group - // --------------------------------------------------------------------- - - indicatorGroups = new ArrayList(indicatorService.getAllIndicatorGroups()); - - Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() ); - - // --------------------------------------------------------------------- - // Organisation unit - // --------------------------------------------------------------------- - - organisationUnits = new ArrayList( organisationUnitService.getOrganisationUnitsAtLevel( 1 ) ); - - Collections.sort( organisationUnits, organisationUnitComparator ); - - displayPropertyHandler.handle( organisationUnits ); // --------------------------------------------------------------------- // Level @@ -364,7 +268,6 @@ selectedDataElements = new ArrayList( export.getDataElements() ); displayPropertyHandler.handle( selectedDataElements ); Collections.sort( selectedDataElements, dataElementComparator ); - dataElements.removeAll( selectedDataElements ); // --------------------------------------------------------------------- // Indicator @@ -373,7 +276,6 @@ selectedIndicators = new ArrayList( export.getIndicators() ); displayPropertyHandler.handle( selectedIndicators ); Collections.sort( selectedIndicators, indicatorComparator ); - indicators.removeAll( selectedIndicators ); // --------------------------------------------------------------------- // Organisation unit @@ -382,7 +284,6 @@ selectedOrganisationUnits = new ArrayList( export.getOrganisationUnits() ); displayPropertyHandler.handle( selectedOrganisationUnits ); Collections.sort( selectedOrganisationUnits, organisationUnitComparator ); - organisationUnits.removeAll( selectedOrganisationUnits ); // --------------------------------------------------------------------- // Period === modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-datamart/src/main/resources/META-INF/dhis/beans.xml 2011-06-23 14:44:17 +0000 +++ dhis-2/dhis-web/dhis-web-datamart/src/main/resources/META-INF/dhis/beans.xml 2011-10-01 09:05:47 +0000 @@ -23,8 +23,6 @@ - - === modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-datamart/src/main/resources/struts.xml 2011-09-29 06:40:09 +0000 +++ dhis-2/dhis-web/dhis-web-datamart/src/main/resources/struts.xml 2011-10-01 09:05:47 +0000 @@ -33,7 +33,7 @@ - /dhis-web-datamart/responseExportStatus.vm + /dhis-web-datamart/jsonExportStatus.vm plainTextError @@ -45,8 +45,9 @@ - getDataMartExports.action - F_DATAMART_ADMIN + + ../dhis-web-commons/ajax/jsonResponseSuccess.vm + plainTextError === modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/exportForm.vm' --- dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/exportForm.vm 2011-09-16 07:53:59 +0000 +++ dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/exportForm.vm 2011-10-01 09:05:47 +0000 @@ -1,4 +1,5 @@ - +