climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1572832 - /incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js
Date Fri, 28 Feb 2014 05:49:07 GMT
Author: joyce
Date: Fri Feb 28 05:49:07 2014
New Revision: 1572832

URL: http://svn.apache.org/r1572832
Log:
CLIMATE-333 - Update backend call in ResultCtrl

CLIMATE-354 - Fix cache directory removal code

Modified:
    incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js

Modified: incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js?rev=1572832&r1=1572831&r2=1572832&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js (original)
+++ incubator/climate/trunk/ocw-ui/frontend/app/js/controllers/ResultCtrl.js Fri Feb 28 05:49:07
2014
@@ -24,11 +24,15 @@ function($rootScope, $scope, $http) {
     $scope.results = [];
 
     // Get all evaluation directories
-    $http.jsonp($rootScope.baseURL + '/getResultDirInfo?callback=JSON_CALLBACK')
+    $http.jsonp($rootScope.baseURL + '/dir/results/?callback=JSON_CALLBACK')
     .success(function(data) {
-      var removeItem = "/cache";
-      data.splice( $.inArray(removeItem,data) ,1 );
-      $scope.results = data.sort().reverse();
-    });
+		data = data['listing']
+
+		var cacheDirIndex = data.indexOf("/cache");
+		if (cacheDirIndex > -1) {
+			data.split(cacheDirIndex, 1)
+		}
 
+		$scope.results = data.sort().reverse();
+    });
 }]);



Mime
View raw message