dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #09950
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2708: Removed data mart exports from dashboard. Not very useful and might mess up when using batch aggr...
------------------------------------------------------------
revno: 2708
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-01-21 17:22:50 +0100
message:
Removed data mart exports from dashboard. Not very useful and might mess up when using batch aggregation strategy.
removed:
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDataMartExportAction.java
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/provider/DataMartExportContentProvider.java
dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/AddDataMartExportToDashboardAction.java
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardContent.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/DashboardContentDeletionHandler.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardContent.hbm.xml
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml
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/struts.xml
dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/javascript/datamart.js
dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/viewExportForm.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml
resources/sql/integritychecks.sql
--
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-api/src/main/java/org/hisp/dhis/dashboard/DashboardContent.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardContent.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dashboard/DashboardContent.java 2011-01-21 16:22:50 +0000
@@ -30,7 +30,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.hisp.dhis.datamart.DataMartExport;
import org.hisp.dhis.document.Document;
import org.hisp.dhis.mapping.MapView;
import org.hisp.dhis.olap.OlapURL;
@@ -52,8 +51,6 @@
private List<Report> reports = new ArrayList<Report>();
- private List<DataMartExport> dataMartExports = new ArrayList<DataMartExport>();
-
private List<OlapURL> olapUrls = new ArrayList<OlapURL>();
private List<Document> documents = new ArrayList<Document>();
@@ -114,20 +111,7 @@
}
}
}
-
- public void addDataMartExport( DataMartExport export )
- {
- if ( !dataMartExports.contains( export ) )
- {
- dataMartExports.add( 0, export );
-
- while ( dataMartExports.size() > MAX_DASHBOARD_ELEMENTS )
- {
- dataMartExports.remove( MAX_DASHBOARD_ELEMENTS );
- }
- }
- }
-
+
public void addOlapUrl( OlapURL url )
{
if ( !olapUrls.contains( url ) )
@@ -214,16 +198,6 @@
this.reports = reports;
}
- public List<DataMartExport> getDataMartExports()
- {
- return dataMartExports;
- }
-
- public void setDataMartExports( List<DataMartExport> dataMartExports )
- {
- this.dataMartExports = dataMartExports;
- }
-
public List<OlapURL> getOlapUrls()
{
return olapUrls;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2011-01-18 09:41:25 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2011-01-21 16:22:50 +0000
@@ -82,6 +82,7 @@
executeSql( "DROP TABLE roworder" );
executeSql( "DROP TABLE sectionmembers" );
executeSql( "DROP TABLE reporttable_categoryoptioncombos" );
+ executeSql( "DROP TABLE dashboardcontent_datamartexports" );
executeSql( "ALTER TABLE dataelementcategoryoption drop column categoryid" );
executeSql( "ALTER TABLE reporttable DROP column dimensiontype" );
executeSql( "ALTER TABLE categoryoptioncombo DROP COLUMN displayorder" );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/DashboardContentDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/DashboardContentDeletionHandler.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/dashboard/DashboardContentDeletionHandler.java 2011-01-21 16:22:50 +0000
@@ -27,7 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.datamart.DataMartExport;
import org.hisp.dhis.document.Document;
import org.hisp.dhis.mapping.MapView;
import org.hisp.dhis.olap.OlapURL;
@@ -81,19 +80,7 @@
}
}
}
-
- @Override
- public void deleteDataMartExport( DataMartExport dataMartExport )
- {
- for ( DashboardContent content : dashboardService.getAllDashboardContent() )
- {
- if ( content.getDataMartExports().remove( dataMartExport ) )
- {
- dashboardService.saveDashboardContent( content );
- }
- }
- }
-
+
@Override
public void deleteDocument( Document document )
{
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardContent.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardContent.hbm.xml 2009-06-17 22:06:54 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/dashboard/hibernate/DashboardContent.hbm.xml 2011-01-21 16:22:50 +0000
@@ -20,14 +20,7 @@
<many-to-many column="reportid"
class="org.hisp.dhis.report.Report"/>
</list>
-
- <list name="dataMartExports" table="dashboardcontent_datamartexports">
- <key column="userid"/>
- <list-index column="sort_order" base="0"/>
- <many-to-many column="datamartexportid"
- class="org.hisp.dhis.datamart.DataMartExport"/>
- </list>
-
+
<list name="olapUrls" table="dashboardcontent_olapurls">
<key column="userid"/>
<list-index column="sort_order" base="0"/>
=== removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDataMartExportAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDataMartExportAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/action/RemoveDataMartExportAction.java 1970-01-01 00:00:00 +0000
@@ -1,105 +0,0 @@
-package org.hisp.dhis.dashboard.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 org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
-import org.hisp.dhis.datamart.DataMartExport;
-import org.hisp.dhis.datamart.DataMartService;
-import org.hisp.dhis.user.CurrentUserService;
-import org.hisp.dhis.user.User;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class RemoveDataMartExportAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private CurrentUserService currentUserService;
-
- public void setCurrentUserService( CurrentUserService currentUserService )
- {
- this.currentUserService = currentUserService;
- }
-
- private DashboardService dashboardService;
-
- public void setDashboardService( DashboardService dashboardService )
- {
- this.dashboardService = dashboardService;
- }
-
- private DataMartService dataMartService;
-
- public void setDataMartService( DataMartService dataMartService )
- {
- this.dataMartService = dataMartService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- User user = currentUserService.getCurrentUser();
-
- if ( user != null )
- {
- DashboardContent content = dashboardService.getDashboardContent( user );
-
- DataMartExport export = dataMartService.getDataMartExport( id );
-
- if ( content.getDataMartExports().remove( export ) )
- {
- dashboardService.saveDashboardContent( content );
- }
- }
-
- return SUCCESS;
- }
-}
-
=== removed file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/provider/DataMartExportContentProvider.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/provider/DataMartExportContentProvider.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/provider/DataMartExportContentProvider.java 1970-01-01 00:00:00 +0000
@@ -1,97 +0,0 @@
-package org.hisp.dhis.dashboard.provider;
-
-/*
- * 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 java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
-import org.hisp.dhis.datamart.DataMartExport;
-import org.hisp.dhis.datamart.comparator.DataMartExportComparator;
-import org.hisp.dhis.user.CurrentUserService;
-import org.hisp.dhis.user.User;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class DataMartExportContentProvider
- implements ContentProvider
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private CurrentUserService currentUserService;
-
- public void setCurrentUserService( CurrentUserService currentUserService )
- {
- this.currentUserService = currentUserService;
- }
-
- private DashboardService dashboardService;
-
- public void setDashboardService( DashboardService dashboardService )
- {
- this.dashboardService = dashboardService;
- }
-
- private String key;
-
- public void setKey( String key )
- {
- this.key = key;
- }
-
- // -------------------------------------------------------------------------
- // ContentProvider implementation
- // -------------------------------------------------------------------------
-
- public Map<String, Object> provide()
- {
- Map<String, Object> content = new HashMap<String, Object>();
-
- User user = currentUserService.getCurrentUser();
-
- if ( user != null )
- {
- DashboardContent dashboardContent = dashboardService.getDashboardContent( user );
-
- List<DataMartExport> exports = dashboardContent.getDataMartExports();
-
- Collections.sort( exports, new DataMartExportComparator() );
-
- content.put( key, exports );
- }
-
- return content;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml 2011-01-17 13:36:43 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/META-INF/dhis/beans.xml 2011-01-21 16:22:50 +0000
@@ -21,14 +21,7 @@
<property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService"/>
<property name="key" value="documents"/>
</bean>
-
- <bean id="dataMartExportContentProvider"
- class="org.hisp.dhis.dashboard.provider.DataMartExportContentProvider">
- <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService"/>
- <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService"/>
- <property name="key" value="dataMartExports"/>
- </bean>
-
+
<bean id="reportTableContentProvider"
class="org.hisp.dhis.dashboard.provider.ReportTableContentProvider">
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService"/>
@@ -73,10 +66,6 @@
<ref local="documentContentProvider"/>
</entry>
<entry>
- <key><value>data_mart_export</value></key>
- <ref local="dataMartExportContentProvider"/>
- </entry>
- <entry>
<key><value>report_table</value></key>
<ref local="reportTableContentProvider"/>
</entry>
@@ -127,14 +116,6 @@
<property name="reportService" ref="org.hisp.dhis.report.ReportService"/>
</bean>
- <bean id="org.hisp.dhis.dashboard.action.RemoveDataMartExportAction"
- class="org.hisp.dhis.dashboard.action.RemoveDataMartExportAction"
- scope="prototype">
- <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService"/>
- <property name="dashboardService" ref="org.hisp.dhis.dashboard.DashboardService"/>
- <property name="dataMartService" ref="org.hisp.dhis.datamart.DataMartService"/>
- </bean>
-
<bean id="org.hisp.dhis.dashboard.action.RemoveOlapUrlAction"
class="org.hisp.dhis.dashboard.action.RemoveOlapUrlAction"
scope="prototype">
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2010-10-14 08:54:26 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties 2011-01-21 16:22:50 +0000
@@ -8,7 +8,6 @@
rss_pregnancy= RSS Pregnancy
report= Reports
document= Documents
-data_mart_export= Data mart exports
report_table= Report tables
olap_url= OLAP URLs
map_view = Map views
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml 2009-09-07 07:24:01 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/struts.xml 2011-01-21 16:22:50 +0000
@@ -37,10 +37,6 @@
<result name="success" type="redirect">index.action</result>
</action>
- <action name="removeDataMartExport" class="org.hisp.dhis.dashboard.action.RemoveDataMartExportAction">
- <result name="success" type="redirect">index.action</result>
- </action>
-
<action name="removeOlapUrl" class="org.hisp.dhis.dashboard.action.RemoveOlapUrlAction">
<result name="success" type="redirect">index.action</result>
</action>
=== removed file 'dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/AddDataMartExportToDashboardAction.java'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/AddDataMartExportToDashboardAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/java/org/hisp/dhis/datamart/action/AddDataMartExportToDashboardAction.java 1970-01-01 00:00:00 +0000
@@ -1,113 +0,0 @@
-package org.hisp.dhis.datamart.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 org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.dashboard.DashboardContent;
-import org.hisp.dhis.dashboard.DashboardService;
-import org.hisp.dhis.datamart.DataMartExport;
-import org.hisp.dhis.datamart.DataMartService;
-import org.hisp.dhis.user.CurrentUserService;
-import org.hisp.dhis.user.User;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class AddDataMartExportToDashboardAction
- implements Action
-{
- private static final Log log = LogFactory.getLog( AddDataMartExportToDashboardAction.class );
-
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private CurrentUserService currentUserService;
-
- public void setCurrentUserService( CurrentUserService currentUserService )
- {
- this.currentUserService = currentUserService;
- }
-
- private DashboardService dashboardService;
-
- public void setDashboardService( DashboardService dashboardService )
- {
- this.dashboardService = dashboardService;
- }
-
- private DataMartService dataMartService;
-
- public void setDataMartService( DataMartService dataMartService )
- {
- this.dataMartService = dataMartService;
- }
-
- // -------------------------------------------------------------------------
- // Input
- // -------------------------------------------------------------------------
-
- private Integer id;
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- {
- User user = currentUserService.getCurrentUser();
-
- if ( user != null )
- {
- DashboardContent content = dashboardService.getDashboardContent( user );
-
- DataMartExport export = dataMartService.getDataMartExport( id );
-
- content.addDataMartExport( export );
-
- dashboardService.saveDashboardContent( content );
-
- log.info( "Added data mart export '" + export.getName() + " ' to dashboard for user '" + user.getName() + "'" );
- }
- else
- {
- log.warn( "Could not add data mart export to dashboard, no current user" );
- }
-
- return SUCCESS;
- }
-}
=== 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-01-20 07:45:51 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/resources/META-INF/dhis/beans.xml 2011-01-21 16:22:50 +0000
@@ -88,18 +88,7 @@
<property name="dataMartService"
ref="org.hisp.dhis.datamart.DataMartService"/>
</bean>
-
- <bean id="org.hisp.dhis.datamart.action.AddDataMartExportToDashboardAction"
- class="org.hisp.dhis.datamart.action.AddDataMartExportToDashboardAction"
- scope="prototype">
- <property name="currentUserService"
- ref="org.hisp.dhis.user.CurrentUserService"/>
- <property name="dashboardService"
- ref="org.hisp.dhis.dashboard.DashboardService"/>
- <property name="dataMartService"
- ref="org.hisp.dhis.datamart.DataMartService"/>
- </bean>
-
+
<!-- Schedule -->
<bean id="org.hisp.dhis.datamart.action.GetScheduledExportStatusAction"
=== 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-01-20 07:45:51 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/resources/struts.xml 2011-01-21 16:22:50 +0000
@@ -54,12 +54,7 @@
<param name="javascripts">javascript/datamart.js</param>
<param name="stylesheets">../dhis-web-commons/paging/paging.css</param>
</action>
-
- <action name="addDataMartExportToDashboard" class="org.hisp.dhis.datamart.action.AddDataMartExportToDashboardAction">
- <result name="success" type="velocity-xml">/dhis-web-datamart/responseSuccess.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
+
<action name="saveDataMartExport" class="org.hisp.dhis.datamart.action.SaveDataMartExportAction">
<result name="success" type="redirect">getDataMartExports.action</result>
</action>
=== modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/javascript/datamart.js'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/javascript/datamart.js 2011-01-06 09:03:29 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/javascript/datamart.js 2011-01-21 16:22:50 +0000
@@ -318,18 +318,3 @@
return true;
}
-
-// -----------------------------------------------------------------------------
-// Dashboard
-// -----------------------------------------------------------------------------
-
-function addToDashboard( id )
-{
- var dialog = window.confirm( i18n_confirm_add_to_dashboard );
-
- if ( dialog )
- {
- var request = new Request();
- request.send( "addDataMartExportToDashboard.action?id=" + id );
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/viewExportForm.vm'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/viewExportForm.vm 2011-01-11 13:11:31 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/viewExportForm.vm 2011-01-21 16:22:50 +0000
@@ -12,7 +12,7 @@
</table>
<table class="listTable" id="listTable">
<col/>
- <col width="150"/>
+ <col width="100"/>
<thead>
<tr>
<th>$i18n.getString( "name" )</th>
@@ -27,7 +27,6 @@
<a href="exportDataMartExport.action?id=$export.id" title="$i18n.getString( 'export' )"><img src="../images/start_process.png" alt="$i18n.getString( 'export' )"/></a>
<a href="getOptions.action?id=$export.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
<a href="javascript:removeDatamartExport( $export.id, '$encoder.jsEncode( $export.name )' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"/></a>
- <a href="javascript:addToDashboard( '$export.id' )" title="$i18n.getString( 'add_to_dashboard' )"><img src="../images/add_to_dashboard.png" alt="$i18n.getString( 'add_to_dashboard' )"/></a>
<a href="javascript:showDataMartExportDetails( $export.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"/></a>
</td>
</tr>
=== 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 2011-01-14 18:10:02 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml 2011-01-21 16:22:50 +0000
@@ -202,7 +202,6 @@
<action name="createTable" class="org.hisp.dhis.reporting.tablecreator.action.CreateTableAction">
<result name="success" type="velocity-xml">/dhis-web-reporting/responseSuccess.vm</result>
<param name="onExceptionReturn">plainTextError</param>
- <param name="requiredAuthorities">F_REPORTTABLE_ADD</param>
</action>
<action name="getReportParams" class="org.hisp.dhis.reporting.tablecreator.action.GetReportParamsAction">
=== modified file 'resources/sql/integritychecks.sql'
--- resources/sql/integritychecks.sql 2011-01-20 11:39:27 +0000
+++ resources/sql/integritychecks.sql 2011-01-21 16:22:50 +0000
@@ -50,3 +50,10 @@
join reporttable t using(reporttableid)
where t.name='Indicators';
+-- Recreate indexes on aggregated tables
+
+DROP INDEX aggregateddatavalue_index;
+DROP INDEX aggregatedindicatorvalue_index;
+CREATE INDEX aggregateddatavalue_index ON aggregateddatavalue (dataelementid, categoryoptioncomboid, periodid, organisationunitid);
+CREATE INDEX aggregatedindicatorvalue_index ON aggregatedindicatorvalue (indicatorid, periodid, organisationunitid);
+