Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: gm/rebaseline_server/static/loader.js

Issue 26891003: rebaseline_server: allow client to pull all results, or just failures (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: todo_about_global Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/rebaseline_server/server.py ('k') | gm/rebaseline_server/static/view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/static/loader.js
===================================================================
--- gm/rebaseline_server/static/loader.js (revision 11711)
+++ gm/rebaseline_server/static/loader.js (working copy)
@@ -31,14 +31,24 @@
Loader.controller(
'Loader.Controller',
- function($scope, $http, $filter) {
- $http.get("/results/all").then(
- function(response) {
- $scope.header = response.data.header;
- $scope.categories = response.data.categories;
- $scope.testData = response.data.testData;
+ function($scope, $http, $filter, $location) {
+ var resultsToLoad = $location.search().resultsToLoad;
+ $scope.loadingMessage = "Loading results of type '" + resultsToLoad +
+ "', please wait...";
+
+ $http.get("/results/" + resultsToLoad).success(
+ function(data, status, header, config) {
+ $scope.loadingMessage = "Processing data, please wait...";
+
+ $scope.header = data.header;
+ $scope.categories = data.categories;
+ $scope.testData = data.testData;
$scope.sortColumn = 'test';
+ for (var i = 0; i < $scope.testData.length; i++) {
+ $scope.testData[i].index = i;
+ }
+
$scope.hiddenResultTypes = {
'failure-ignored': true,
'no-comparison': true,
@@ -48,7 +58,13 @@
$scope.selectedItems = {};
$scope.updateResults();
+ $scope.loadingMessage = "";
}
+ ).error(
+ function(data, status, header, config) {
+ $scope.loadingMessage = "Failed to load results of type '"
+ + resultsToLoad + "'";
+ }
);
$scope.isItemSelected = function(index) {
« no previous file with comments | « gm/rebaseline_server/server.py ('k') | gm/rebaseline_server/static/view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698