dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40153
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20339: Removed organisation unit merge and data element merge functions. Not working and too risky since...
------------------------------------------------------------
revno: 20339
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-09-24 09:35:03 +0200
message:
Removed organisation unit merge and data element merge functions. Not working and too risky since it could fail and leave the database in an inconsistent state.
removed:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge/
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge/DataMergeService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge/DataMergeStore.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/DefaultDataMergeService.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc/
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc/JdbcDataMergeStore.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/duplicatedataelimination/
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/duplicatedataelimination/EliminateDuplicateDataAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/organisationunitmerge/
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/organisationunitmerge/MergeOrganisationUnitsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/duplicateDataEliminationForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/organisationUnitMergeForm.vm
modified:
dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/menu.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
=== removed directory 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge'
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge/DataMergeService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge/DataMergeService.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge/DataMergeService.java 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-package org.hisp.dhis.datamerge;
-
-/*
- * Copyright (c) 2004-2015, 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 org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-/**
- * @author Lars Helge Overland
- */
-public interface DataMergeService
-{
- void eliminateDuplicateDataElement( DataElement destDataElement, DataElementCategoryOptionCombo destCategoryOptionCombo,
- DataElement sourceDataElement, DataElementCategoryOptionCombo sourceCategoryOptionCombo );
-
- void mergeOrganisationUnits( OrganisationUnit dest, OrganisationUnit source );
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge/DataMergeStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge/DataMergeStore.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datamerge/DataMergeStore.java 1970-01-01 00:00:00 +0000
@@ -1,58 +0,0 @@
-package org.hisp.dhis.datamerge;
-
-/*
- * Copyright (c) 2004-2015, 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 org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-
-/**
- * @author Lars Helge Overland
- */
-public interface DataMergeStore
-{
- /**
- * Eliminate duplicate data element and its data values.
- *
- * @param destDataElement the destination data element.
- * @param destCategoryOptionCombo the destination category option combo.
- * @param sourceDataElement the source data element.
- * @param sourceCategoryOptionCombo the source category option combo.
- */
- void eliminateDuplicateDataElement( DataElement destDataElement, DataElementCategoryOptionCombo destCategoryOptionCombo,
- DataElement sourceDataElement, DataElementCategoryOptionCombo sourceCategoryOptionCombo );
-
- /**
- * Merge organisation units and their data values.
- *
- * @param dest the destination organisation unit.
- * @param source the source organisation unit.
- */
- void mergeOrganisationUnits( OrganisationUnit dest, OrganisationUnit source );
-}
=== removed directory 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge'
=== removed file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/DefaultDataMergeService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/DefaultDataMergeService.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/DefaultDataMergeService.java 1970-01-01 00:00:00 +0000
@@ -1,137 +0,0 @@
-package org.hisp.dhis.datamerge;
-
-/*
- * Copyright (c) 2004-2015, 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 org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.common.DeleteNotAllowedException;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.hierarchy.HierarchyViolationException;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.springframework.transaction.annotation.Transactional;
-
-/**
- * @author Lars Helge Overland
- */
-public class DefaultDataMergeService
- implements DataMergeService
-{
- private static final Log log = LogFactory.getLog( DefaultDataMergeService.class );
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private DataMergeStore dataMergeStore;
-
- public void setDataMergeStore( DataMergeStore dataMergeStore )
- {
- this.dataMergeStore = dataMergeStore;
- }
-
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- // -------------------------------------------------------------------------
- // DataMergeService implementation
- // -------------------------------------------------------------------------
-
- @Override
- @Transactional
- public void eliminateDuplicateDataElement( DataElement destDataElement, DataElementCategoryOptionCombo destCategoryOptionCombo,
- DataElement sourceDataElement, DataElementCategoryOptionCombo sourceCategoryOptionCombo )
- {
- // ---------------------------------------------------------------------
- // Eliminate duplicates
- // ---------------------------------------------------------------------
-
- dataMergeStore.eliminateDuplicateDataElement( destDataElement, destCategoryOptionCombo, sourceDataElement, sourceCategoryOptionCombo );
-
- // ---------------------------------------------------------------------
- // Delete source
- // ---------------------------------------------------------------------
-
- try
- {
- dataElementService.deleteDataElement( sourceDataElement );
- }
- catch ( DeleteNotAllowedException ex )
- {
- log.info( "Not deleting data element because it has custom dimensions and more data associated with it" );
- }
- }
-
- @Override
- @Transactional
- public void mergeOrganisationUnits( OrganisationUnit dest, OrganisationUnit source )
- {
- // ---------------------------------------------------------------------
- // Merge source data with destination
- // ---------------------------------------------------------------------
-
- dataMergeStore.mergeOrganisationUnits( dest, source );
-
- // ---------------------------------------------------------------------
- // Set parent of children of destination to source
- // ---------------------------------------------------------------------
-
- for ( OrganisationUnit child : source.getChildren() )
- {
- child.setParent( dest );
-
- organisationUnitService.updateOrganisationUnit( child );
- }
-
- // ---------------------------------------------------------------------
- // Delete source
- // ---------------------------------------------------------------------
-
- try
- {
- organisationUnitService.deleteOrganisationUnit( source );
- }
- catch ( HierarchyViolationException ex )
- {
- }
- }
-}
=== removed directory 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc'
=== removed file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc/JdbcDataMergeStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc/JdbcDataMergeStore.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc/JdbcDataMergeStore.java 1970-01-01 00:00:00 +0000
@@ -1,148 +0,0 @@
-package org.hisp.dhis.datamerge.jdbc;
-
-/*
- * Copyright (c) 2004-2015, 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 org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.datamerge.DataMergeStore;
-import org.hisp.dhis.jdbc.StatementBuilder;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-/**
- * @author Lars Helge Overland
- */
-public class JdbcDataMergeStore
- implements DataMergeStore
-{
- private static final Log log = LogFactory.getLog( JdbcDataMergeStore.class );
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private JdbcTemplate jdbcTemplate;
-
- public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
- {
- this.jdbcTemplate = jdbcTemplate;
- }
-
- private StatementBuilder statementBuilder;
-
- public void setStatementBuilder( StatementBuilder statementBuilder )
- {
- this.statementBuilder = statementBuilder;
- }
-
- // -------------------------------------------------------------------------
- // DataMergeStore implementation
- // -------------------------------------------------------------------------
-
- @Override
- public void eliminateDuplicateDataElement( DataElement destDataElement, DataElementCategoryOptionCombo destCategoryOptionCombo,
- DataElement sourceDataElement, DataElementCategoryOptionCombo sourceCategoryOptionCombo )
- {
- final int destDataElementId = destDataElement.getId();
- final int destCategoryOptionComboId = destCategoryOptionCombo.getId();
- final int sourceDataElementId = sourceDataElement.getId();
- final int sourceCategoryOptionComboId = sourceCategoryOptionCombo.getId();
-
- // Move from source to destination where destination does not exist
-
- String sql = statementBuilder.getMoveFromSourceToDestination( destDataElementId, destCategoryOptionComboId, sourceDataElementId, sourceCategoryOptionComboId );
- log.info( sql );
- jdbcTemplate.execute( sql );
-
- // Update destination with source where source is last update
-
- sql = statementBuilder.getUpdateDestination( destDataElementId, destCategoryOptionComboId, sourceDataElementId, sourceCategoryOptionComboId );
- log.info( sql );
- jdbcTemplate.execute( sql );
-
- // Delete remaining source data value audits
-
- sql = "DELETE FROM datavalueaudit WHERE dataelementid=" + sourceDataElementId + " AND categoryoptioncomboid=" + sourceCategoryOptionComboId + ";";
-
- log.info( sql );
- jdbcTemplate.execute( sql );
-
- // Delete remaining source data values
-
- sql = "DELETE FROM datavalue WHERE dataelementid=" + sourceDataElementId + " AND categoryoptioncomboid=" + sourceCategoryOptionComboId + ";";
-
- log.info( sql );
- jdbcTemplate.execute( sql );
- }
-
- @Override
- public void mergeOrganisationUnits( OrganisationUnit dest, OrganisationUnit source )
- {
- final int destId = dest.getId();
- final int sourceId = source.getId();
-
- // Move from source to destination where destination does not exist
-
- String sql = statementBuilder.getMoveDataValueToDestination( sourceId, destId );
- log.info( sql );
- jdbcTemplate.execute( sql );
-
- // Summarize destination and source where matching
-
- sql = statementBuilder.getSummarizeDestinationAndSourceWhereMatching( sourceId, destId );
- log.info( sql );
- jdbcTemplate.execute( sql );
-
- // TODO also deal with bool and string
-
- // Delete remaining source data value audits
-
- sql = "DELETE FROM datavalueaudit WHERE organisationunitid=" + sourceId + ";";
-
- log.info( sql );
- jdbcTemplate.execute( sql );
-
- // Delete remaining source data values
-
- sql = "DELETE FROM datavalue WHERE sourceid=" + sourceId + ";";
-
- log.info( sql );
- jdbcTemplate.execute( sql );
-
- // Delete complete data set registrations
-
- sql = "DELETE FROM completedatasetregistration WHERE sourceid=" + sourceId + ";";
-
- log.info( sql );
- jdbcTemplate.execute( sql );
-
- }
-}
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2015-08-31 08:57:11 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2015-09-24 07:35:03 +0000
@@ -67,19 +67,6 @@
<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
<property name="dataBrowserGridStore" ref="org.hisp.dhis.databrowser.DataBrowserGridStore" />
</bean>
-
- <!-- Data merge -->
-
- <bean id="org.hisp.dhis.datamerge.DataMergeStore" class="org.hisp.dhis.datamerge.jdbc.JdbcDataMergeStore">
- <property name="jdbcTemplate" ref="jdbcTemplate" />
- <property name="statementBuilder" ref="statementBuilder" />
- </bean>
-
- <bean id="org.hisp.dhis.datamerge.DataMergeService" class="org.hisp.dhis.datamerge.DefaultDataMergeService">
- <property name="dataMergeStore" ref="org.hisp.dhis.datamerge.DataMergeStore" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- </bean>
<!-- Sql View -->
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java 2015-09-24 07:15:17 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/StaticContentController.java 2015-09-24 07:35:03 +0000
@@ -170,7 +170,6 @@
throw new WebMessageException( (WebMessageUtils
.error( "Error saving file, make sure dhis_home envoirement variable is set" )) );
}
-
}
/**
=== removed directory 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/duplicatedataelimination'
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/duplicatedataelimination/EliminateDuplicateDataAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/duplicatedataelimination/EliminateDuplicateDataAction.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/duplicatedataelimination/EliminateDuplicateDataAction.java 1970-01-01 00:00:00 +0000
@@ -1,133 +0,0 @@
-package org.hisp.dhis.dataadmin.action.duplicatedataelimination;
-
-/*
- * Copyright (c) 2004-2015, 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 org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryService;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.datamerge.DataMergeService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- */
-public class EliminateDuplicateDataAction
- implements Action
-{
- private static final Log log = LogFactory.getLog( EliminateDuplicateDataAction.class );
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private DataMergeService dataMergeService;
-
- public void setDataMergeService( DataMergeService dataMergeService )
- {
- this.dataMergeService = dataMergeService;
- }
-
- private DataElementService dataElementService;
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- private DataElementCategoryService categoryService;
-
- public void setCategoryService( DataElementCategoryService categoryService )
- {
- this.categoryService = categoryService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer dataElementToEliminate;
-
- public void setDataElementToEliminate( Integer dataElementToEliminate )
- {
- this.dataElementToEliminate = dataElementToEliminate;
- }
-
- private Integer categoryOptionComboToEliminate;
-
- public void setCategoryOptionComboToEliminate( Integer categoryOptionComboToEliminate )
- {
- this.categoryOptionComboToEliminate = categoryOptionComboToEliminate;
- }
-
- private Integer dataElementToKeep;
-
- public void setDataElementToKeep( Integer dataElementToKeep )
- {
- this.dataElementToKeep = dataElementToKeep;
- }
-
- private Integer categoryOptionComboToKeep;
-
- public void setCategoryOptionComboToKeep( Integer categoryOptionComboToKeep )
- {
- this.categoryOptionComboToKeep = categoryOptionComboToKeep;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- {
- DataElement dataElementEliminate = dataElementService.getDataElement( dataElementToEliminate );
-
- DataElementCategoryOptionCombo categoryOptionComboEliminate = categoryService.getDataElementCategoryOptionCombo( categoryOptionComboToEliminate );
-
- DataElement dataElementKeep = dataElementService.getDataElement( dataElementToKeep );
-
- DataElementCategoryOptionCombo categoryOptionComboKeep = categoryService.getDataElementCategoryOptionCombo( categoryOptionComboToKeep );
-
- log.info( "Eliminating: " + dataElementEliminate + " " + categoryOptionComboEliminate );
- log.info( "Keeping: " + dataElementKeep + " " + categoryOptionComboKeep );
-
- if ( !( dataElementToEliminate == dataElementToKeep && categoryOptionComboEliminate == categoryOptionComboKeep ) )
- {
- dataMergeService.eliminateDuplicateDataElement( dataElementKeep, categoryOptionComboKeep, dataElementEliminate, categoryOptionComboEliminate );
- }
-
- log.info( "Elimination done" );
-
- return SUCCESS;
- }
-}
=== removed directory 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/organisationunitmerge'
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/organisationunitmerge/MergeOrganisationUnitsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/organisationunitmerge/MergeOrganisationUnitsAction.java 2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/organisationunitmerge/MergeOrganisationUnitsAction.java 1970-01-01 00:00:00 +0000
@@ -1,103 +0,0 @@
-package org.hisp.dhis.dataadmin.action.organisationunitmerge;
-
-/*
- * Copyright (c) 2004-2015, 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 com.opensymphony.xwork2.Action;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.datamerge.DataMergeService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-
-/**
- * @author Lars Helge Overland
- */
-public class MergeOrganisationUnitsAction
- implements Action
-{
- private static final Log log = LogFactory.getLog( MergeOrganisationUnitsAction.class );
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private DataMergeService dataMergeService;
-
- public void setDataMergeService( DataMergeService dataMergeService )
- {
- this.dataMergeService = dataMergeService;
- }
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private String organisationUnitToEliminate;
-
- public void setOrganisationUnitToEliminate( String organisationUnitToEliminate )
- {
- this.organisationUnitToEliminate = organisationUnitToEliminate;
- }
-
- private String organisationUnitToKeep;
-
- public void setOrganisationUnitToKeep( String organisationUnitToKeep )
- {
- this.organisationUnitToKeep = organisationUnitToKeep;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- {
- OrganisationUnit eliminate = organisationUnitService.getOrganisationUnit( organisationUnitToEliminate );
- OrganisationUnit keep = organisationUnitService.getOrganisationUnit( organisationUnitToKeep );
-
- log.info( "Merging " + eliminate + " into " + keep );
-
- if ( !(organisationUnitToEliminate.equals( organisationUnitToKeep )) )
- {
- dataMergeService.mergeOrganisationUnits( keep, eliminate );
- }
-
- log.info( "Merging complete" );
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml 2015-08-30 14:21:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/META-INF/dhis/beans.xml 2015-09-24 07:35:03 +0000
@@ -63,15 +63,6 @@
class="org.hisp.dhis.dataadmin.action.databrowser.ExportResultAction"
scope="prototype" />
- <!-- Organisation unit merge -->
-
- <bean id="org.hisp.dhis.dataadmin.action.organisationunitmerge.MergeOrganisationUnitsAction"
- class="org.hisp.dhis.dataadmin.action.organisationunitmerge.MergeOrganisationUnitsAction"
- scope="prototype">
- <property name="dataMergeService" ref="org.hisp.dhis.datamerge.DataMergeService" />
- <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- </bean>
-
<!-- I18nLocale -->
<bean id="org.hisp.dhis.dataadmin.action.locale.GetLocaleListAction"
@@ -98,16 +89,6 @@
class="org.hisp.dhis.dataadmin.action.locale.ValidateLocaleAction"
scope="prototype" />
- <!-- Duplicate data elimination -->
-
- <bean id="org.hisp.dhis.dataadmin.action.duplicatedataelimination.EliminateDuplicateDataAction"
- class="org.hisp.dhis.dataadmin.action.duplicatedataelimination.EliminateDuplicateDataAction"
- scope="prototype">
- <property name="dataMergeService" ref="org.hisp.dhis.datamerge.DataMergeService" />
- <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
- <property name="categoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService" />
- </bean>
-
<!-- Min/Max validation -->
<bean id="org.hisp.dhis.dataadmin.action.minmaxvalidation.GetMinMaxValidationParamsAction"
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2015-09-17 14:15:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2015-09-24 07:35:03 +0000
@@ -186,38 +186,6 @@
<param name="requiredAuthorities">F_VIEW_DATABROWSER</param>
</action>
- <!-- Organisation unit merge -->
-
- <action name="displayOrganisationUnitMergeForm" class="org.hisp.dhis.dataadmin.action.NoAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">
- /dhis-web-maintenance-dataadmin/organisationUnitMergeForm.vm
- </param>
- <param name="menu">/dhis-web-maintenance-dataadmin/menu.vm</param>
- <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/organisationUnitMerge.js</param>
- <param name="requiredAuthorities">F_MERGE_ORGANISATION_UNITS</param>
- </action>
-
- <action name="mergeOrganisationUnits" class="org.hisp.dhis.dataadmin.action.organisationunitmerge.MergeOrganisationUnitsAction">
- <result name="success" type="redirect">displayOrganisationUnitMergeForm.action</result>
- <param name="requiredAuthorities">F_MERGE_ORGANISATION_UNITS</param>
- </action>
-
- <!-- Duplicate data elimination -->
-
- <action name="displayDuplicateDataEliminationForm" class="org.hisp.dhis.dataadmin.action.NoAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-maintenance-dataadmin/duplicateDataEliminationForm.vm</param>
- <param name="menu">/dhis-web-maintenance-dataadmin/menu.vm</param>
- <param name="javascripts">javascript/duplicateDataElimination.js</param>
- <param name="requiredAuthorities">F_ELIMINATE_DUPLICATE_DATA_ELEMENTS</param>
- </action>
-
- <action name="eliminateDuplicateData" class="org.hisp.dhis.dataadmin.action.duplicatedataelimination.EliminateDuplicateDataAction">
- <result name="success" type="redirect">displayDuplicateDataEliminationForm.action</result>
- <param name="requiredAuthorities">F_ELIMINATE_DUPLICATE_DATA_ELEMENTS</param>
- </action>
-
<!-- Min/Max validation -->
<action name="generateMinMaxValue" class="org.hisp.dhis.dataadmin.action.minmaxvalidation.GenerateMinMaxValuesAction">
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/duplicateDataEliminationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/duplicateDataEliminationForm.vm 2011-07-07 10:02:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/duplicateDataEliminationForm.vm 1970-01-01 00:00:00 +0000
@@ -1,64 +0,0 @@
-<script type="text/javascript">
- jQuery(document).ready(function() {
- initLists();
- });
-
- var i18n_eliminating = '$encoder.jsEscape( $i18n.getString( "eliminating" ), "'" )';
- var i18n_elimination_done = '$encoder.jsEscape( $i18n.getString( "elimination_done" ), "'" )';
- var i18n_select_different_data_elements = '$encoder.jsEscape( $i18n.getString( "select_different_data_elements" ), "'" )';
-</script>
-
-<h3>$i18n.getString( "duplicate_data_elimination" ) #openHelp( "duplicateDataElimination" )</h3>
-
-<div style="width: 450px;">
- <select id="operandList" name="operandList" multiple="multiple" style="height: 150px; width: 100%;"></select>
-</div>
-
-<br/>
-
-<table>
- <col style="width:2em"/>
- <col/>
- <tr>
- <td rowspan="3" id="step1" style="text-align:center;background-color:#ccffcc">1.</td>
- <th>$i18n.getString( "select_the_data_element_to_eliminate" )</th>
- </tr>
- <tr>
- <td><span id="eliminateNameField">[$i18n.getString( "not_selected" )]</span></td>
- </tr>
- <tr>
- <td>
- <input id="confirmEliminateButton" type="button" value="$i18n.getString( 'confirm' )" onclick="eliminateConfirmed()" style="width:10em" disabled="disabled" />
- </td>
- </tr>
- <tr>
- <td colspan="2"> </td>
- </tr>
- <tr>
- <td rowspan="3" id="step2" style="text-align:center">2.</td>
- <th>$i18n.getString( "select_the_data_element_to_keep" )</th>
- </tr>
- <tr>
- <td><span id="keepNameField">[$i18n.getString( "not_selected" )]</span></td>
- </tr>
- <tr>
- <td>
- <input id="confirmKeepButton" type="button" value="$i18n.getString( 'confirm' )" onclick="keepConfirmed()" style="width:10em" disabled="disabled" />
- </td>
- </tr>
- <tr>
- <td colspan="2"> </td>
- </tr>
- <tr>
- <td rowspan="2" id="step3" style="text-align:center">3.</td>
- <th>$i18n.getString( "eliminate" )</th>
- </tr>
- <tr>
- <td>
- <input type="button" id="eliminateButton" value="$i18n.getString( 'eliminate' )" style="width:10em" onclick="eliminate()" disabled="disabled" />
- <input type="button" value="$i18n.getString( 'reset' )" style="width:10em" onclick="window.location.href='displayDuplicateDataEliminationForm.action'" />
- </td>
- </tr>
-</table>
-
-<p><span id="message"></span></p>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm 2015-03-13 18:42:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/index.vm 2015-09-24 07:35:03 +0000
@@ -7,8 +7,6 @@
#introListImgItem( "displayResourceTableForm.action" "resource_table" "resourcetable" )
#introListImgItem( "locale.action" "locale" "datadictionary" )
#introListImgItem( "sqlView.action" "sql_view" "sqlview" )
- #introListImgItem( "displayOrganisationUnitMergeForm.action" "organisation_unit_merge" "organisationunitmerge" )
- #introListImgItem( "displayDuplicateDataEliminationForm.action" "duplicate_data_elimination" "duplicatedataelimination" )
#introListImgItem( "viewStatistics.action" "data_statistics" "datastatistics" )
#introListImgItem( "lockException.action" "lock_exception" "datalocking" )
#introListImgItem( "getMinMaxValidationParams.action" "min_max_value_generation" "minmaxvaluegeneration" )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/menu.vm 2015-03-13 18:42:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/menu.vm 2015-09-24 07:35:03 +0000
@@ -8,8 +8,6 @@
<li><a href="displayResourceTableForm.action">$i18n.getString( "resource_table" ) </a></li>
<li><a href="locale.action">$i18n.getString( "locale" ) </a></li>
<li><a href="sqlView.action">$i18n.getString( "sql_view" ) </a></li>
- <li><a href="displayOrganisationUnitMergeForm.action">$i18n.getString( "organisation_unit_merge" ) </a></li>
- <li><a href="displayDuplicateDataEliminationForm.action">$i18n.getString( "duplicate_data_elimination" ) </a></li>
<li><a href="viewStatistics.action">$i18n.getString( "data_statistics" ) </a></li>
<li><a href="lockException.action">$i18n.getString( "lock_exception" ) </a></li>
<li><a href="getMinMaxValidationParams.action">$i18n.getString( "min_max_value_generation") </a></li>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/organisationUnitMergeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/organisationUnitMergeForm.vm 2015-08-03 22:22:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/organisationUnitMergeForm.vm 1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
-<script type="text/javascript">
- jQuery(document).ready(function() {
- selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTreeSelection.setListenerFunction( treeSelected );
- selectionTree.clearSelectedOrganisationUnitsAndBuildTree();
- });
-
- var i18n_merging = '$encoder.jsEscape( $i18n.getString( "merging" ), "'" )';
- var i18n_merging_done = '$encoder.jsEscape( $i18n.getString( "merging_done" ), "'" )';
- var i18n_select_different_org_units = '$encoder.jsEscape( $i18n.getString( "select_different_org_units" ), "'" )';
-</script>
-
-
-<h3>$i18n.getString( "organisation_unit_merge" ) #openHelp( "organisationUnitMerge" )</h3>
-
-<div id="selectionTree" style="width:500px; height:200px"></div>
-
-<br/>
-
-<table>
- <col style="width:2em"/>
- <col/>
- <tr>
- <td rowspan="3" id="step1" style="text-align:center;background-color:#ccffcc">1.</td>
- <th>$i18n.getString( "select_the_org_unit_to_eliminate" )</th>
- </tr>
- <tr>
- <td><span id="eliminateNameField">[$i18n.getString( "not_selected" )]</span></td>
- </tr>
- <tr>
- <td>
- <input id="confirmOrganisationUnitToEliminateButton" type="button" value="$i18n.getString( 'confirm' )" onclick="organisationUnitToEliminateConfirmed()" style="width:10em" disabled="disabled"/>
- </td>
- </tr>
- <tr>
- <td colspan="2"> </td>
- </tr>
- <tr>
- <td rowspan="3" id="step2" style="text-align:center">2.</td>
- <th>$i18n.getString( "select_the_org_unit_to_keep" )</th>
- </tr>
- <tr>
- <td><span id="keepNameField">[$i18n.getString( "not_selected" )]</span></td>
- </tr>
- <tr>
- <td>
- <input id="confirmOrganisationUnitToKeepButton" type="button" value="$i18n.getString( 'confirm' )" onclick="organisationUnitToKeepConfirmed()" style="width:10em" disabled="disabled" />
- </td>
- </tr>
- <tr>
- <td colspan="2"> </td>
- </tr>
- <tr>
- <td rowspan="2" id="step3" style="text-align:center">3.</td>
- <th>$i18n.getString( "merge" )</th>
- </tr>
- <tr>
- <td>
- <input type="button" id="mergeButton" value="$i18n.getString( 'merge' )" style="width:10em" onclick="mergeOrganisationUnits()" disabled="disabled" />
- <input type="button" value="$i18n.getString( 'reset' )" style="width:10em" onclick="window.location.href='displayOrganisationUnitMergeForm.action'" />
- </td>
- </tr>
-</table>
-
-<p><span id="message"></span></p>