dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10990
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3038: Compacted pivot table data response
------------------------------------------------------------
revno: 3038
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-03-15 05:00:28 +0100
message:
Compacted pivot table data response
modified:
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responsePivotTable.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responsePivotTable.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responsePivotTable.vm 2011-01-21 18:49:34 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responsePivotTable.vm 2011-03-15 04:00:28 +0000
@@ -1,38 +1,32 @@
{
- "pivotTable":
- {
- "sizeIndicators": "$pivotTable.indicators.size()",
- "sizePeriods": "$pivotTable.periods.size()",
- "sizeOrganisationUnits": "$pivotTable.organisationUnits.size()",
- "indicators":
- [
- #set( $size = $pivotTable.indicators.size() )
- #foreach( $indicator in $pivotTable.indicators )
- { "id": "${indicator.id}", "name": "$!encoder.jsonEncode( ${indicator.shortName} )" }#if( $velocityCount < $size ),#end
- #end
- ],
- "periods":
- [
- #set( $size = $pivotTable.periods.size() )
- #foreach( $period in $pivotTable.periods )
- { "id": "${period.id}", "name": "$!encoder.jsonEncode( ${period.name} )" }#if( $velocityCount < $size ),#end
- #end
- ],
- "organisationUnits":
- [
- #set( $size = $pivotTable.organisationUnits.size() )
- #foreach( $organisationUnit in $pivotTable.organisationUnits )
- { "id": "${organisationUnit.id}", "name": "$!encoder.jsonEncode( ${organisationUnit.shortName} )" }#if( $velocityCount < $size ),#end
- #end
- ],
- "indicatorValues":
- [
- {
- #set( $size = $pivotTable.indicatorValues.size() )
- #foreach( $value in $pivotTable.indicatorValues )
- "${value.indicatorId}-${value.periodId}-${value.organisationUnitId}": "${value.value}"#if( $velocityCount < $size ),#end
- #end
- }
- ]
- }
+"pivotTable": {
+"sizeIndicators": "$pivotTable.indicators.size()",
+"sizePeriods": "$pivotTable.periods.size()",
+"sizeOrganisationUnits": "$pivotTable.organisationUnits.size()",
+
+"indicators": [
+#set( $size = $pivotTable.indicators.size() )
+#foreach( $indicator in $pivotTable.indicators )
+{ "id":"${indicator.id}", "name":"$!encoder.jsonEncode( ${indicator.shortName} )" }#if( $velocityCount < $size ),#end
+#end ],
+
+"periods": [
+#set( $size = $pivotTable.periods.size() )
+#foreach( $period in $pivotTable.periods )
+{ "id":"${period.id}","name": "$!encoder.jsonEncode( ${period.name} )" }#if( $velocityCount < $size ),#end
+#end ],
+
+"organisationUnits": [
+#set( $size = $pivotTable.organisationUnits.size() )
+#foreach( $organisationUnit in $pivotTable.organisationUnits )
+{ "id":"${organisationUnit.id}", "name":"$!encoder.jsonEncode( ${organisationUnit.shortName} )" }#if( $velocityCount < $size ),#end
+#end ],
+
+"indicatorValues": [
+{
+#set( $size = $pivotTable.indicatorValues.size() )
+#foreach( $value in $pivotTable.indicatorValues )
+"${value.indicatorId}-${value.periodId}-${value.organisationUnitId}":"${value.value}"#if( $velocityCount < $size ),#end
+#end } ]
+}
}
\ No newline at end of file