dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06533
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2091: Made the standard report screen only have one button for generating report. User is asked whether...
------------------------------------------------------------
revno: 2091
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Tue 2010-07-06 01:45:39 +0200
message:
Made the standard report screen only have one button for generating report. User is asked whether to aggregate data or use existing data at the report params screen. User is always requested to enter report params if any. Implements improve-report-table-params-selection
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/CreateTableAction.java
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/webapp/dhis-web-reporting/inputReportParamsForm.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewReportForm.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-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java 2010-06-23 17:50:25 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java 2010-07-05 23:45:39 +0000
@@ -55,7 +55,7 @@
* @param format the I18nFormat to use.
*/
void createReportTables( int id, String mode, Integer reportingPeriod,
- Integer parentOrganisationUnitId, Integer organisationUnitId, I18nFormat format );
+ Integer parentOrganisationUnitId, Integer organisationUnitId, boolean doDataMart, I18nFormat format );
/**
* Creates a report table. Exports the relevant data to data mart, updates
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java 2010-07-05 23:45:39 +0000
@@ -92,7 +92,14 @@
{
this.organisationUnitId = organisationUnitId;
}
+
+ private boolean doDataMart;
+ public void setDoDataMart( boolean doDataMart )
+ {
+ this.doDataMart = doDataMart;
+ }
+
private I18nFormat format;
public void setFormat( I18nFormat format )
@@ -116,6 +123,6 @@
@Override
public void executeStatements()
{
- reportTableService.createReportTables( id, mode, reportingPeriod, parentOrganisationUnitId, organisationUnitId, format );
+ reportTableService.createReportTables( id, mode, reportingPeriod, parentOrganisationUnitId, organisationUnitId, doDataMart, format );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java 2010-06-23 17:50:25 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java 2010-07-05 23:45:39 +0000
@@ -143,7 +143,7 @@
@Transactional
public void createReportTables( int id, String mode, Integer reportingPeriod,
- Integer parentOrganisationUnitId, Integer organisationUnitId, I18nFormat format )
+ Integer parentOrganisationUnitId, Integer organisationUnitId, boolean doDataMart, I18nFormat format )
{
for ( ReportTable reportTable : getReportTables( id, mode ) )
{
@@ -204,7 +204,7 @@
// Create report table
// -----------------------------------------------------------------
- createReportTable( reportTable, true );
+ createReportTable( reportTable, doDataMart );
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/CreateTableAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/CreateTableAction.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/CreateTableAction.java 2010-07-05 23:45:39 +0000
@@ -110,6 +110,13 @@
this.organisationUnitId = organisationUnitId;
}
+ private boolean doDataMart;
+
+ public void setDoDataMart( boolean doDataMart )
+ {
+ this.doDataMart = doDataMart;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -128,6 +135,7 @@
process.setReportingPeriod( reportingPeriod );
process.setParentOrganisationUnitId( parentOrganisationUnitId );
process.setOrganisationUnitId( organisationUnitId );
+ process.setDoDataMart( doDataMart );
process.setFormat( format );
processCoordinator.requestProcessExecution( executor );
=== 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-07-05 21:00:54 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2010-07-05 23:45:39 +0000
@@ -274,6 +274,9 @@
month = Month
year = Year
total = Total
+data_source = Data source
+aggregate_data = Aggregate data
+use_existing_data = Use existing data
select_dimension = Select dimension
tally_sheet_report = Tally Sheet report
data_completeness_report = Data Completeness Report
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm 2010-07-05 21:54:20 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm 2010-07-05 23:45:39 +0000
@@ -6,32 +6,41 @@
<input type="hidden" id="id" name="id" value="$!id">
<input type="hidden" id="mode" name="mode" value="$!mode">
-#if ( $mode == "status" )
+#if ( $mode == "status" ) <!-- Keep the process running and show status -->
<script type="text/javascript">
getTableStatus();
</script>
#end
-<!-- Report mode and no report parameters: proceed to generate report tables and view report -->
-
-#if ( $mode == "report" && $!reportParams.isSet() == false )
- <script type="text/javascript">
- runAndViewReport( "$id", "$url" );
- </script>
-#end
-
-<!-- Report table mode and no report parameters: proceed to generate report table -->
-
-#if ( $mode == "table" && $!reportParams.isSet() == false )
+#if ( $mode == "table" && $!reportParams.isSet() == false ) <!-- Create table, nothing to ask -->
<script type="text/javascript">
- createTable( "$id" );
+ createTable( '$id' );
</script>
#end
-<!-- Report / report table parameters exists: input parameters -->
-
<table>
-
+
+ <!-- Data source -->
+
+ #if ( $mode == "report" )
+
+ <tr>
+ <th>$i18n.getString( "data_source" )</th>
+ </tr>
+ <tr>
+ <td>
+ <select id="doDataMart" name="doDataMart" style="width:325px">
+ <option value="true">$i18n.getString( "aggregate_data" )</a>
+ <option value="false">$i18n.getString( "use_existing_data" )</a>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4" style="height:10px"></td>
+ </tr>
+
+ #end
+
<!-- Reporting month -->
#if ( $!reportParams.isParamReportingMonth() )
@@ -102,16 +111,12 @@
<tr>
<td>
- #if ( $mode == "table" && $!reportParams.isSet() )
- <input type="button" value="$i18n.getString( 'ok' )" onclick="createTable( '$id' )" style="width:120px">
- #end
#if ( $mode == "table" || $mode == "status" )
+ <input type="button" value="$i18n.getString( 'ok' )" onclick="createTable( '$id' )" style="width:120px">
<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='displayManageTableForm.action'" style="width:120px">
#end
- #if ( $mode == "report" && $!reportParams.isSet() )
+ #if ( $mode == "report" )
<input type="button" value="$i18n.getString( 'ok' )" style="width:120px" onclick="runAndViewReport( '$id', '$url' )">
- #end
- #if ( $mode == "report" )
<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='displayViewReportForm.action'" style="width:120px">
#end
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js 2010-07-05 21:54:20 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js 2010-07-05 23:45:39 +0000
@@ -16,7 +16,7 @@
function runAndViewReport( reportId, reportUrl )
{
- var url = "createTable.action?id=" + reportId + "&mode=report";
+ var url = "createTable.action?id=" + reportId + "&doDataMart=" + getListValue( "doDataMart" ) + "&mode=report";
if ( document.getElementById( "reportingPeriod" ) != null )
{
@@ -74,7 +74,7 @@
}
else
{
- setWaitMessage( i18n_please_wait + ". " + statusMessage + "..." );
+ setWaitMessage( i18n_please_wait + " - " + statusMessage );
waitAndGetReportStatus( 2000 );
}
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewReportForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewReportForm.vm 2010-06-15 03:12:16 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewReportForm.vm 2010-07-05 23:45:39 +0000
@@ -17,19 +17,21 @@
<col width="20">
<col width="20">
<col width="20">
- <col width="20">
<thead>
<tr>
<th>$i18n.getString( "name" )</th>
- <th colspan="5" class="{sorter: false}">$i18n.getString( "operations" )</th>
+ <th colspan="4" class="{sorter: false}">$i18n.getString( "operations" )</th>
</tr>
</thead>
<tbody id="list">
#foreach ( $report in $reports )
<tr id="tr${report.id}">
<td>$encoder.htmlEncode( $report.name )</td>
- <td style="text-align:center">#if ( $report.hasReportTable )<a href="getReportParams.action?id=$report.id&url=$report.url&mode=report" title="$i18n.getString( 'generate_datasource_and_view_report' )"><img src="../images/open.png" alt="$i18n.getString( 'generate_datasource_and_view_report' )"></a>#end</td>
- <td style="text-align:center"><a href="javascript:viewReport( '$encoder.htmlEncode( $report.url )' )" title="$i18n.getString( 'view_report_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">
+ #if ( $report.hasReportTable ) <a href="getReportParams.action?id=$report.id&url=$report.url&mode=report" title="$i18n.getString( 'create' )">
+ #else <a href="javascript:viewReport( '$encoder.htmlEncode( $report.url )' )" title="$i18n.getString( 'create' )">#end
+ <img src="../images/start_process.png" alt="$i18n.getString( 'create' )"></a>
+ </td>
<td style="text-align:center"><a href="displayAddReportForm.action?id=$report.id" title="$i18n.getString( 'edit_report' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit_report' )"></a></td>
<td style="text-align:center"><a href="javascript:addToDashboard( '$report.id' )" title="$i18n.getString( 'add_to_dashboard' )"><img src="../images/add_to_dashboard.png" alt="$i18n.getString( 'add_to_dashboard' )"></a></td>
<td style="text-align:center"><a href="javascript:removeReport( $report.id )" title="$i18n.getString( 'remove_report' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove_report' )"></a></td>