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

Side by Side Diff: gm/rebaseline_server/static/loader.js

Issue 195943004: rebaseline_server: generate JSON that can be viewed without a live server (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment Created 6 years, 9 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
« no previous file with comments | « gm/rebaseline_server/static/index.html ('k') | no next file » | 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.extraColumnHeaders and $scope.imagePairs . 4 * them into $scope.extraColumnHeaders and $scope.imagePairs .
5 */ 5 */
6 var Loader = angular.module( 6 var Loader = angular.module(
7 'Loader', 7 'Loader',
8 ['ConstantsModule'] 8 ['ConstantsModule']
9 ); 9 );
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 ); 57 );
58 58
59 59
60 Loader.controller( 60 Loader.controller(
61 'Loader.Controller', 61 'Loader.Controller',
62 function($scope, $http, $filter, $location, $log, $timeout, constants) { 62 function($scope, $http, $filter, $location, $log, $timeout, constants) {
63 $scope.constants = constants; 63 $scope.constants = constants;
64 $scope.windowTitle = "Loading GM Results..."; 64 $scope.windowTitle = "Loading GM Results...";
65 $scope.resultsToLoad = $location.search().resultsToLoad; 65 $scope.resultsToLoad = $location.search().resultsToLoad;
66 $scope.loadingMessage = "Loading results of type '" + $scope.resultsToLoad + 66 $scope.loadingMessage = "Loading results from '" + $scope.resultsToLoad +
67 "', please wait..."; 67 "', please wait...";
68 68
69 /** 69 /**
70 * On initial page load, load a full dictionary of results. 70 * On initial page load, load a full dictionary of results.
71 * Once the dictionary is loaded, unhide the page elements so they can 71 * Once the dictionary is loaded, unhide the page elements so they can
72 * render the data. 72 * render the data.
73 */ 73 */
74 $http.get("/results/" + $scope.resultsToLoad).success( 74 $http.get($scope.resultsToLoad).success(
75 function(data, status, header, config) { 75 function(data, status, header, config) {
76 var dataHeader = data[constants.KEY__HEADER]; 76 var dataHeader = data[constants.KEY__HEADER];
77 if (dataHeader[constants.KEY__HEADER__IS_STILL_LOADING]) { 77 if (dataHeader[constants.KEY__HEADER__IS_STILL_LOADING]) {
78 // Apply the server's requested reload delay to local time, 78 // Apply the server's requested reload delay to local time,
79 // so we will wait the right number of seconds regardless of clock 79 // so we will wait the right number of seconds regardless of clock
80 // skew between client and server. 80 // skew between client and server.
81 var reloadDelayInSeconds = 81 var reloadDelayInSeconds =
82 dataHeader[constants.KEY__HEADER__TIME_NEXT_UPDATE_AVAILABLE] - 82 dataHeader[constants.KEY__HEADER__TIME_NEXT_UPDATE_AVAILABLE] -
83 dataHeader[constants.KEY__HEADER__TIME_UPDATED]; 83 dataHeader[constants.KEY__HEADER__TIME_UPDATED];
84 var timeNow = new Date().getTime(); 84 var timeNow = new Date().getTime();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // If any defaults were overridden in the URL, get them now. 159 // If any defaults were overridden in the URL, get them now.
160 $scope.queryParameters.load(); 160 $scope.queryParameters.load();
161 161
162 $scope.updateResults(); 162 $scope.updateResults();
163 $scope.loadingMessage = ""; 163 $scope.loadingMessage = "";
164 $scope.windowTitle = "Current GM Results"; 164 $scope.windowTitle = "Current GM Results";
165 } 165 }
166 } 166 }
167 ).error( 167 ).error(
168 function(data, status, header, config) { 168 function(data, status, header, config) {
169 $scope.loadingMessage = "Failed to load results of type '" 169 $scope.loadingMessage = "Failed to load results from '"
170 + $scope.resultsToLoad + "'"; 170 + $scope.resultsToLoad + "'";
171 $scope.windowTitle = "Failed to Load GM Results"; 171 $scope.windowTitle = "Failed to Load GM Results";
172 } 172 }
173 ); 173 );
174 174
175 175
176 // 176 //
177 // Select/Clear/Toggle all tests. 177 // Select/Clear/Toggle all tests.
178 // 178 //
179 179
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 */ 785 */
786 $scope.getImageDiffRelativeUrl = function(imagePair) { 786 $scope.getImageDiffRelativeUrl = function(imagePair) {
787 var before = 787 var before =
788 imagePair[constants.KEY__IMAGE_A_URL] + "-vs-" + 788 imagePair[constants.KEY__IMAGE_A_URL] + "-vs-" +
789 imagePair[constants.KEY__IMAGE_B_URL]; 789 imagePair[constants.KEY__IMAGE_B_URL];
790 return before.replace(/[^\w\-]/g, "_") + ".png"; 790 return before.replace(/[^\w\-]/g, "_") + ".png";
791 } 791 }
792 792
793 } 793 }
794 ); 794 );
OLDNEW
« no previous file with comments | « gm/rebaseline_server/static/index.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698