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

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

Issue 368933002: rebaseline_server: add urlSchemaVersion parameter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use str.format() Created 6 years, 6 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 296689bde23fff581e364b805b4f77fa8f7ccdd5..dbded05f2500684664a2653d37368f715d3b0df0 100644
--- a/gm/rebaseline_server/static/loader.js
+++ b/gm/rebaseline_server/static/loader.js
@@ -426,6 +426,16 @@ Loader.controller(
// any which are not found within the URL will keep their current value.
$scope.queryParameters.load = function() {
var nameValuePairs = $location.search();
+
+ var urlSchemaVersion = nameValuePairs[constants.URL_KEY__SCHEMA_VERSION];
+ if (!urlSchemaVersion) {
+ $scope.urlSchemaVersionLoaded = 0;
+ } else if (urlSchemaVersion == constants.URL_VALUE__SCHEMA_VERSION__ALWAYS_CURRENT) {
+ $scope.urlSchemaVersionLoaded = constants.URL_VALUE__SCHEMA_VERSION__CURRENT;
+ } else {
+ $scope.urlSchemaVersionLoaded = urlSchemaVersion;
+ }
+
angular.forEach($scope.queryParameters.map,
function(copier, paramName) {
copier.load(nameValuePairs, paramName);
@@ -436,6 +446,7 @@ Loader.controller(
// Saves all parameters from $scope into the URL query string.
$scope.queryParameters.save = function() {
var nameValuePairs = {};
+ nameValuePairs[constants.URL_KEY__SCHEMA_VERSION] = constants.URL_VALUE__SCHEMA_VERSION__CURRENT;
angular.forEach($scope.queryParameters.map,
function(copier, paramName) {
copier.save(nameValuePairs, paramName);
« 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