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

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

Issue 196533021: rebaseline_server: make intermediate JSON specify base urls for diff images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/rebaseline_server/static/constants.js ('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
diff --git a/gm/rebaseline_server/static/loader.js b/gm/rebaseline_server/static/loader.js
index d2c7288a2fdb3601707ccb441cb35df33470e96f..fea5aa0404632ad52797464a99a27c6ce1e6b988 100644
--- a/gm/rebaseline_server/static/loader.js
+++ b/gm/rebaseline_server/static/loader.js
@@ -63,8 +63,7 @@ Loader.controller(
$scope.constants = constants;
$scope.windowTitle = "Loading GM Results...";
$scope.resultsToLoad = $location.search().resultsToLoad;
- $scope.loadingMessage = "Loading results from '" + $scope.resultsToLoad +
- "', please wait...";
+ $scope.loadingMessage = "please wait...";
/**
* On initial page load, load a full dictionary of results.
@@ -74,7 +73,13 @@ Loader.controller(
$http.get($scope.resultsToLoad).success(
function(data, status, header, config) {
var dataHeader = data[constants.KEY__HEADER];
- if (dataHeader[constants.KEY__HEADER__IS_STILL_LOADING]) {
+ if (dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] !=
+ constants.REBASELINE_SERVER_SCHEMA_VERSION_NUMBER) {
+ $scope.loadingMessage = "ERROR: Got JSON file with schema version "
+ + dataHeader[constants.KEY__HEADER__SCHEMA_VERSION]
+ + " but expected schema version "
+ + constants.REBASELINE_SERVER_SCHEMA_VERSION_NUMBER;
+ } else if (dataHeader[constants.KEY__HEADER__IS_STILL_LOADING]) {
// Apply the server's requested reload delay to local time,
// so we will wait the right number of seconds regardless of clock
// skew between client and server.
@@ -84,19 +89,13 @@ Loader.controller(
var timeNow = new Date().getTime();
var timeToReload = timeNow + reloadDelayInSeconds * 1000;
$scope.loadingMessage =
- "Server is still loading results; will retry at " +
+ "server is still loading results; will retry at " +
$scope.localTimeString(timeToReload / 1000);
$timeout(
function(){location.reload();},
timeToReload - timeNow);
- } else if (dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] !=
- constants.REBASELINE_SERVER_SCHEMA_VERSION_NUMBER) {
- $scope.loadingMessage = "ERROR: Got JSON file with schema version "
- + dataHeader[constants.KEY__HEADER__SCHEMA_VERSION]
- + " but expected schema version "
- + constants.REBASELINE_SERVER_SCHEMA_VERSION_NUMBER;
} else {
- $scope.loadingMessage = "Processing data, please wait...";
+ $scope.loadingMessage = "processing data, please wait...";
$scope.header = dataHeader;
$scope.extraColumnHeaders = data[constants.KEY__EXTRACOLUMNHEADERS];
@@ -172,8 +171,7 @@ Loader.controller(
}
).error(
function(data, status, header, config) {
- $scope.loadingMessage = "Failed to load results from '"
- + $scope.resultsToLoad + "'";
+ $scope.loadingMessage = "FAILED to load.";
$scope.windowTitle = "Failed to Load GM Results";
}
);
« no previous file with comments | « gm/rebaseline_server/static/constants.js ('k') | gm/rebaseline_server/static/view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698