← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10251: Reduced size of notifications ping response

 

------------------------------------------------------------
revno: 10251
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-15 14:49:43 +0100
message:
  Reduced size of notifications ping response
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonNotifications.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataMart.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-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonNotifications.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonNotifications.vm	2012-04-11 09:02:06 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonNotifications.vm	2013-03-15 13:49:43 +0000
@@ -1,5 +1,5 @@
 #set( $size = $notifications.size() )
-{ "notifications": [
+[
 #foreach( $notification in $notifications )
   {
     "uid": "${notification.uid}",
@@ -10,4 +10,4 @@
     "completed": "${notification.completed}"    
   }#if( $velocityCount < $size ),#end
 #end
-] }
\ No newline at end of file
+]
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2013-03-15 13:13:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2013-03-15 13:49:43 +0000
@@ -1778,12 +1778,12 @@
 	
 	var param = lastUid ? '&lastUid=' + lastUid : '';
 	
-	$.getJSON( '../dhis-web-commons-ajax-json/getNotifications.action?category=' + category + param, function( json )
+	$.getJSON( '../dhis-web-commons-ajax-json/getNotifications.action?category=' + category + param, function( notifications )
 	{
 		var html = '';
 		var isComplete = false;
 		
-		$.each( json.notifications, function( i, notification )
+		$.each( notifications, function( i, notification )
 		{
 			var first = i == 0;
 			var loaderHtml = '';			

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataMart.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataMart.js	2013-03-15 13:13:18 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataMart.js	2013-03-15 13:49:43 +0000
@@ -29,7 +29,7 @@
 function pingNotificationsTimeout()
 {
 	pingNotifications( 'DATAMART', 'notificationTable' );
-	setTimeout( "pingNotificationsTimeout()", 2000 );
+	setTimeout( "pingNotificationsTimeout()", 2500 );
 }
 
 function toggleDataMart()