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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gm/rebaseline_server/server.py ('k') | gm/rebaseline_server/static/view.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Loader: 2 * Loader:
3 * Reads GM result reports written out by results.py, and imports 3 * Reads GM result reports written out by results.py, and imports
4 * them into $scope.categories and $scope.testData . 4 * them into $scope.categories and $scope.testData .
5 */ 5 */
6 var Loader = angular.module( 6 var Loader = angular.module(
7 'Loader', 7 'Loader',
8 [] 8 []
9 ); 9 );
10 10
(...skipping 13 matching lines...) Expand all
24 filteredItems.push(item); 24 filteredItems.push(item);
25 } 25 }
26 } 26 }
27 return filteredItems; 27 return filteredItems;
28 }; 28 };
29 } 29 }
30 ); 30 );
31 31
32 Loader.controller( 32 Loader.controller(
33 'Loader.Controller', 33 'Loader.Controller',
34 function($scope, $http, $filter) { 34 function($scope, $http, $filter, $location) {
35 $http.get("/results/all").then( 35 var resultsToLoad = $location.search().resultsToLoad;
36 function(response) { 36 $scope.loadingMessage = "Loading results of type '" + resultsToLoad +
37 $scope.header = response.data.header; 37 "', please wait...";
38 $scope.categories = response.data.categories; 38
39 $scope.testData = response.data.testData; 39 $http.get("/results/" + resultsToLoad).success(
40 function(data, status, header, config) {
41 $scope.loadingMessage = "Processing data, please wait...";
42
43 $scope.header = data.header;
44 $scope.categories = data.categories;
45 $scope.testData = data.testData;
40 $scope.sortColumn = 'test'; 46 $scope.sortColumn = 'test';
41 47
48 for (var i = 0; i < $scope.testData.length; i++) {
49 $scope.testData[i].index = i;
50 }
51
42 $scope.hiddenResultTypes = { 52 $scope.hiddenResultTypes = {
43 'failure-ignored': true, 53 'failure-ignored': true,
44 'no-comparison': true, 54 'no-comparison': true,
45 'succeeded': true, 55 'succeeded': true,
46 }; 56 };
47 $scope.hiddenConfigs = {}; 57 $scope.hiddenConfigs = {};
48 $scope.selectedItems = {}; 58 $scope.selectedItems = {};
49 59
50 $scope.updateResults(); 60 $scope.updateResults();
61 $scope.loadingMessage = "";
62 }
63 ).error(
64 function(data, status, header, config) {
65 $scope.loadingMessage = "Failed to load results of type '"
66 + resultsToLoad + "'";
51 } 67 }
52 ); 68 );
53 69
54 $scope.isItemSelected = function(index) { 70 $scope.isItemSelected = function(index) {
55 return (true == $scope.selectedItems[index]); 71 return (true == $scope.selectedItems[index]);
56 } 72 }
57 $scope.toggleItemSelected = function(index) { 73 $scope.toggleItemSelected = function(index) {
58 if (true == $scope.selectedItems[index]) { 74 if (true == $scope.selectedItems[index]) {
59 delete $scope.selectedItems[index]; 75 delete $scope.selectedItems[index];
60 } else { 76 } else {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 $scope.imageSize = $scope.imageSizePending; 128 $scope.imageSize = $scope.imageSizePending;
113 $scope.areUpdatesPending = false; 129 $scope.areUpdatesPending = false;
114 } 130 }
115 131
116 $scope.sortResultsBy = function(sortColumn) { 132 $scope.sortResultsBy = function(sortColumn) {
117 $scope.sortColumn = sortColumn; 133 $scope.sortColumn = sortColumn;
118 $scope.updateResults(); 134 $scope.updateResults();
119 } 135 }
120 } 136 }
121 ); 137 );
OLDNEW
« 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