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

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

Issue 195763013: make rebaseline_server client check schema version number (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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();
85 var timeToReload = timeNow + reloadDelayInSeconds * 1000; 85 var timeToReload = timeNow + reloadDelayInSeconds * 1000;
86 $scope.loadingMessage = 86 $scope.loadingMessage =
87 "Server is still loading results; will retry at " + 87 "Server is still loading results; will retry at " +
88 $scope.localTimeString(timeToReload / 1000); 88 $scope.localTimeString(timeToReload / 1000);
89 $timeout( 89 $timeout(
90 function(){location.reload();}, 90 function(){location.reload();},
91 timeToReload - timeNow); 91 timeToReload - timeNow);
92 } else if (dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] !=
93 constants.REBASELINE_SERVER_SCHEMA_VERSION_NUMBER) {
94 $scope.loadingMessage = "ERROR: Got JSON file with schema version "
95 + dataHeader[constants.KEY__HEADER__SCHEMA_VERSION]
96 + " but expected schema version "
97 + constants.REBASELINE_SERVER_SCHEMA_VERSION_NUMBER;
92 } else { 98 } else {
93 $scope.loadingMessage = "Processing data, please wait..."; 99 $scope.loadingMessage = "Processing data, please wait...";
94 100
95 $scope.header = dataHeader; 101 $scope.header = dataHeader;
96 $scope.extraColumnHeaders = data[constants.KEY__EXTRACOLUMNHEADERS]; 102 $scope.extraColumnHeaders = data[constants.KEY__EXTRACOLUMNHEADERS];
97 $scope.imagePairs = data[constants.KEY__IMAGEPAIRS]; 103 $scope.imagePairs = data[constants.KEY__IMAGEPAIRS];
98 $scope.imageSets = data[constants.KEY__IMAGESETS]; 104 $scope.imageSets = data[constants.KEY__IMAGESETS];
99 $scope.sortColumnSubdict = constants.KEY__DIFFERENCE_DATA; 105 $scope.sortColumnSubdict = constants.KEY__DIFFERENCE_DATA;
100 $scope.sortColumnKey = constants.KEY__DIFFERENCE_DATA__WEIGHTED_DIFF; 106 $scope.sortColumnKey = constants.KEY__DIFFERENCE_DATA__WEIGHTED_DIFF;
101 107
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 */ 791 */
786 $scope.getImageDiffRelativeUrl = function(imagePair) { 792 $scope.getImageDiffRelativeUrl = function(imagePair) {
787 var before = 793 var before =
788 imagePair[constants.KEY__IMAGE_A_URL] + "-vs-" + 794 imagePair[constants.KEY__IMAGE_A_URL] + "-vs-" +
789 imagePair[constants.KEY__IMAGE_B_URL]; 795 imagePair[constants.KEY__IMAGE_B_URL];
790 return before.replace(/[^\w\-]/g, "_") + ".png"; 796 return before.replace(/[^\w\-]/g, "_") + ".png";
791 } 797 }
792 798
793 } 799 }
794 ); 800 );
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698