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

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

Issue 364253003: rebaseline_server: if urlSchemaVersion is not specified, assume current (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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/constants.js ('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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 $scope.queryParameters.map[constants.KEY__EXTRACOLUMNS__BUILDER] = 420 $scope.queryParameters.map[constants.KEY__EXTRACOLUMNS__BUILDER] =
421 $scope.queryParameters.copiers.categoryValueMatch; 421 $scope.queryParameters.copiers.categoryValueMatch;
422 $scope.queryParameters.map[constants.KEY__EXTRACOLUMNS__TEST] = 422 $scope.queryParameters.map[constants.KEY__EXTRACOLUMNS__TEST] =
423 $scope.queryParameters.copiers.categoryValueMatch; 423 $scope.queryParameters.copiers.categoryValueMatch;
424 424
425 // Loads all parameters into $scope from the URL query string; 425 // Loads all parameters into $scope from the URL query string;
426 // any which are not found within the URL will keep their current value. 426 // any which are not found within the URL will keep their current value.
427 $scope.queryParameters.load = function() { 427 $scope.queryParameters.load = function() {
428 var nameValuePairs = $location.search(); 428 var nameValuePairs = $location.search();
429 429
430 var urlSchemaVersion = nameValuePairs[constants.URL_KEY__SCHEMA_VERSION]; 430 // If urlSchemaVersion is not specified, we assume the current version.
431 if (!urlSchemaVersion) { 431 var urlSchemaVersion = constants.URL_VALUE__SCHEMA_VERSION__CURRENT;
432 $scope.urlSchemaVersionLoaded = 0; 432 if (constants.URL_KEY__SCHEMA_VERSION in nameValuePairs) {
433 } else if (urlSchemaVersion == constants.URL_VALUE__SCHEMA_VERSION__ALWAYS _CURRENT) { 433 urlSchemaVersion = nameValuePairs[constants.URL_KEY__SCHEMA_VERSION];
434 $scope.urlSchemaVersionLoaded = constants.URL_VALUE__SCHEMA_VERSION__CUR RENT;
435 } else {
436 $scope.urlSchemaVersionLoaded = urlSchemaVersion;
437 } 434 }
435 $scope.urlSchemaVersionLoaded = urlSchemaVersion;
438 436
439 angular.forEach($scope.queryParameters.map, 437 angular.forEach($scope.queryParameters.map,
440 function(copier, paramName) { 438 function(copier, paramName) {
441 copier.load(nameValuePairs, paramName); 439 copier.load(nameValuePairs, paramName);
442 } 440 }
443 ); 441 );
444 }; 442 };
445 443
446 // Saves all parameters from $scope into the URL query string. 444 // Saves all parameters from $scope into the URL query string.
447 $scope.queryParameters.save = function() { 445 $scope.queryParameters.save = function() {
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 */ 932 */
935 $scope.getImageDiffRelativeUrl = function(imagePair) { 933 $scope.getImageDiffRelativeUrl = function(imagePair) {
936 var before = 934 var before =
937 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "-vs-" + 935 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "-vs-" +
938 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL]; 936 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL];
939 return before.replace(/[^\w\-]/g, "_") + ".png"; 937 return before.replace(/[^\w\-]/g, "_") + ".png";
940 } 938 }
941 939
942 } 940 }
943 ); 941 );
OLDNEW
« no previous file with comments | « gm/rebaseline_server/static/constants.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698