dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25976
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12891: Made sure dashboard responses are not cached
------------------------------------------------------------
revno: 12891
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-11-06 17:30:25 +0100
message:
Made sure dashboard responses are not cached
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapController.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapViewController.java
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js
--
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-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapController.java 2013-10-08 17:16:47 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapController.java 2013-11-06 16:30:25 +0000
@@ -225,6 +225,10 @@
}
}
+ //--------------------------------------------------------------------------
+ // Get data
+ //--------------------------------------------------------------------------
+
@RequestMapping(value = { "/{uid}/data", "/{uid}/data.png" }, method = RequestMethod.GET)
public void getMapData(
@PathVariable String uid,
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapViewController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapViewController.java 2013-10-21 14:19:10 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapViewController.java 2013-11-06 16:30:25 +0000
@@ -90,7 +90,7 @@
}
@RequestMapping(value = { "/data", "/data.png" }, method = RequestMethod.GET)
- public void getMap( Model model,
+ public void getMapView( Model model,
@RequestParam(value = "in") String indicatorUid,
@RequestParam(value = "ou") String organisationUnitUid,
@RequestParam(value = "level", required = false) Integer level,
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2013-10-16 12:48:29 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2013-11-06 16:30:25 +0000
@@ -623,14 +623,21 @@
dhis2.db.hideSearch();
return false;
}
-
- var hits = $.get( "../api/dashboards/q/" + query + dhis2.db.getMaxParams(), function( data ) {
- var $h = $( "#hitDiv" );
- dhis2.db.renderSearch( data, $h );
- dhis2.db.setHitLinks();
- $h.show();
- $( "#searchField" ).focus();
- } );
+
+ var url = "../api/dashboards/q/" + query + dhis2.db.getMaxParams();
+
+ var hits = $.ajax( {
+ url: url,
+ dataType: "json",
+ cache: false,
+ success: function( data ) {
+ var $h = $( "#hitDiv" );
+ dhis2.db.renderSearch( data, $h );
+ dhis2.db.setHitLinks();
+ $h.show();
+ $( "#searchField" ).focus();
+ }
+ } );
}
dhis2.db.setHitLinks = function()