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

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

Issue 287473002: rename rebaseline_server JSON constants to be more consistent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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
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 17 matching lines...) Expand all
28 // (We would have to make sure truncation still took place after 28 // (We would have to make sure truncation still took place after
29 // sorting, though.) 29 // sorting, though.)
30 Loader.filter( 30 Loader.filter(
31 'removeHiddenImagePairs', 31 'removeHiddenImagePairs',
32 function(constants) { 32 function(constants) {
33 return function(unfilteredImagePairs, hiddenResultTypes, hiddenConfigs, 33 return function(unfilteredImagePairs, hiddenResultTypes, hiddenConfigs,
34 builderSubstring, testSubstring, viewingTab) { 34 builderSubstring, testSubstring, viewingTab) {
35 var filteredImagePairs = []; 35 var filteredImagePairs = [];
36 for (var i = 0; i < unfilteredImagePairs.length; i++) { 36 for (var i = 0; i < unfilteredImagePairs.length; i++) {
37 var imagePair = unfilteredImagePairs[i]; 37 var imagePair = unfilteredImagePairs[i];
38 var extraColumnValues = imagePair[constants.KEY__EXTRA_COLUMN_VALUES]; 38 var extraColumnValues = imagePair[constants.KEY__IMAGEPAIRS__EXTRACOLUMN S];
39 // For performance, we examine the "set" objects directly rather 39 // For performance, we examine the "set" objects directly rather
40 // than calling $scope.isValueInSet(). 40 // than calling $scope.isValueInSet().
41 // Besides, I don't think we have access to $scope in here... 41 // Besides, I don't think we have access to $scope in here...
42 if (!(true == hiddenResultTypes[extraColumnValues[ 42 if (!(true == hiddenResultTypes[extraColumnValues[
43 constants.KEY__EXTRACOLUMN__RESULT_TYPE]]) && 43 constants.KEY__EXTRACOLUMNS__RESULT_TYPE]]) &&
44 !(true == hiddenConfigs[extraColumnValues[ 44 !(true == hiddenConfigs[extraColumnValues[
45 constants.KEY__EXTRACOLUMN__CONFIG]]) && 45 constants.KEY__EXTRACOLUMNS__CONFIG]]) &&
46 !(-1 == extraColumnValues[constants.KEY__EXTRACOLUMN__BUILDER] 46 !(-1 == extraColumnValues[constants.KEY__EXTRACOLUMNS__BUILDER]
47 .indexOf(builderSubstring)) && 47 .indexOf(builderSubstring)) &&
48 !(-1 == extraColumnValues[constants.KEY__EXTRACOLUMN__TEST] 48 !(-1 == extraColumnValues[constants.KEY__EXTRACOLUMNS__TEST]
49 .indexOf(testSubstring)) && 49 .indexOf(testSubstring)) &&
50 (viewingTab == imagePair.tab)) { 50 (viewingTab == imagePair.tab)) {
51 filteredImagePairs.push(imagePair); 51 filteredImagePairs.push(imagePair);
52 } 52 }
53 } 53 }
54 return filteredImagePairs; 54 return filteredImagePairs;
55 }; 55 };
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 = "please wait..."; 66 $scope.loadingMessage = "please wait...";
67 67
68 /** 68 /**
69 * On initial page load, load a full dictionary of results. 69 * On initial page load, load a full dictionary of results.
70 * Once the dictionary is loaded, unhide the page elements so they can 70 * Once the dictionary is loaded, unhide the page elements so they can
71 * render the data. 71 * render the data.
72 */ 72 */
73 $http.get($scope.resultsToLoad).success( 73 $http.get($scope.resultsToLoad).success(
74 function(data, status, header, config) { 74 function(data, status, header, config) {
75 var dataHeader = data[constants.KEY__HEADER]; 75 var dataHeader = data[constants.KEY__ROOT__HEADER];
76 if (dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] != 76 if (dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] !=
77 constants.REBASELINE_SERVER_SCHEMA_VERSION_NUMBER) { 77 constants.VALUE__HEADER__SCHEMA_VERSION) {
78 $scope.loadingMessage = "ERROR: Got JSON file with schema version " 78 $scope.loadingMessage = "ERROR: Got JSON file with schema version "
79 + dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] 79 + dataHeader[constants.KEY__HEADER__SCHEMA_VERSION]
80 + " but expected schema version " 80 + " but expected schema version "
81 + constants.REBASELINE_SERVER_SCHEMA_VERSION_NUMBER; 81 + constants.VALUE__HEADER__SCHEMA_VERSION;
82 } else if (dataHeader[constants.KEY__HEADER__IS_STILL_LOADING]) { 82 } else if (dataHeader[constants.KEY__HEADER__IS_STILL_LOADING]) {
83 // Apply the server's requested reload delay to local time, 83 // Apply the server's requested reload delay to local time,
84 // so we will wait the right number of seconds regardless of clock 84 // so we will wait the right number of seconds regardless of clock
85 // skew between client and server. 85 // skew between client and server.
86 var reloadDelayInSeconds = 86 var reloadDelayInSeconds =
87 dataHeader[constants.KEY__HEADER__TIME_NEXT_UPDATE_AVAILABLE] - 87 dataHeader[constants.KEY__HEADER__TIME_NEXT_UPDATE_AVAILABLE] -
88 dataHeader[constants.KEY__HEADER__TIME_UPDATED]; 88 dataHeader[constants.KEY__HEADER__TIME_UPDATED];
89 var timeNow = new Date().getTime(); 89 var timeNow = new Date().getTime();
90 var timeToReload = timeNow + reloadDelayInSeconds * 1000; 90 var timeToReload = timeNow + reloadDelayInSeconds * 1000;
91 $scope.loadingMessage = 91 $scope.loadingMessage =
92 "server is still loading results; will retry at " + 92 "server is still loading results; will retry at " +
93 $scope.localTimeString(timeToReload / 1000); 93 $scope.localTimeString(timeToReload / 1000);
94 $timeout( 94 $timeout(
95 function(){location.reload();}, 95 function(){location.reload();},
96 timeToReload - timeNow); 96 timeToReload - timeNow);
97 } else { 97 } else {
98 $scope.loadingMessage = "processing data, please wait..."; 98 $scope.loadingMessage = "processing data, please wait...";
99 99
100 $scope.header = dataHeader; 100 $scope.header = dataHeader;
101 $scope.extraColumnHeaders = data[constants.KEY__EXTRACOLUMNHEADERS]; 101 $scope.extraColumnHeaders = data[constants.KEY__ROOT__EXTRACOLUMNHEADE RS];
102 $scope.imagePairs = data[constants.KEY__IMAGEPAIRS]; 102 $scope.imagePairs = data[constants.KEY__ROOT__IMAGEPAIRS];
103 $scope.imageSets = data[constants.KEY__IMAGESETS]; 103 $scope.imageSets = data[constants.KEY__ROOT__IMAGESETS];
104 $scope.sortColumnSubdict = constants.KEY__DIFFERENCE_DATA; 104 $scope.sortColumnSubdict = constants.KEY__IMAGEPAIRS__DIFFERENCES;
105 $scope.sortColumnKey = constants.KEY__DIFFERENCE_DATA__PERCEPTUAL_DIFF ; 105 $scope.sortColumnKey = constants.KEY__DIFFERENCES__PERCEPTUAL_DIFF;
106 106
107 $scope.showSubmitAdvancedSettings = false; 107 $scope.showSubmitAdvancedSettings = false;
108 $scope.submitAdvancedSettings = {}; 108 $scope.submitAdvancedSettings = {};
109 $scope.submitAdvancedSettings[ 109 $scope.submitAdvancedSettings[
110 constants.KEY__EXPECTATIONS__REVIEWED] = true; 110 constants.KEY__EXPECTATIONS__REVIEWED] = true;
111 $scope.submitAdvancedSettings[ 111 $scope.submitAdvancedSettings[
112 constants.KEY__EXPECTATIONS__IGNOREFAILURE] = false; 112 constants.KEY__EXPECTATIONS__IGNOREFAILURE] = false;
113 $scope.submitAdvancedSettings['bug'] = ''; 113 $scope.submitAdvancedSettings['bug'] = '';
114 114
115 // Create the list of tabs (lists into which the user can file each 115 // Create the list of tabs (lists into which the user can file each
(...skipping 26 matching lines...) Expand all
142 142
143 // Sets within which the user can toggle individual elements. 143 // Sets within which the user can toggle individual elements.
144 $scope.hiddenResultTypes = {}; 144 $scope.hiddenResultTypes = {};
145 $scope.hiddenResultTypes[ 145 $scope.hiddenResultTypes[
146 constants.KEY__RESULT_TYPE__FAILUREIGNORED] = true; 146 constants.KEY__RESULT_TYPE__FAILUREIGNORED] = true;
147 $scope.hiddenResultTypes[ 147 $scope.hiddenResultTypes[
148 constants.KEY__RESULT_TYPE__NOCOMPARISON] = true; 148 constants.KEY__RESULT_TYPE__NOCOMPARISON] = true;
149 $scope.hiddenResultTypes[ 149 $scope.hiddenResultTypes[
150 constants.KEY__RESULT_TYPE__SUCCEEDED] = true; 150 constants.KEY__RESULT_TYPE__SUCCEEDED] = true;
151 $scope.allResultTypes = $scope.columnSliceOf2DArray( 151 $scope.allResultTypes = $scope.columnSliceOf2DArray(
152 $scope.extraColumnHeaders[constants.KEY__EXTRACOLUMN__RESULT_TYPE] 152 $scope.extraColumnHeaders[constants.KEY__EXTRACOLUMNS__RESULT_TYPE ]
153 [constants.KEY__EXTRACOLUMNHEADERS__VALUE S_AND_COUNTS], 153 [constants.KEY__EXTRACOLUMNHEADERS__VALUE S_AND_COUNTS],
154 0); 154 0);
155 $scope.hiddenConfigs = {}; 155 $scope.hiddenConfigs = {};
156 $scope.allConfigs = $scope.columnSliceOf2DArray( 156 $scope.allConfigs = $scope.columnSliceOf2DArray(
157 $scope.extraColumnHeaders[constants.KEY__EXTRACOLUMN__CONFIG] 157 $scope.extraColumnHeaders[constants.KEY__EXTRACOLUMNS__CONFIG]
158 [constants.KEY__EXTRACOLUMNHEADERS__VALUE S_AND_COUNTS], 158 [constants.KEY__EXTRACOLUMNHEADERS__VALUE S_AND_COUNTS],
159 0); 159 0);
160 160
161 // Associative array of partial string matches per category. 161 // Associative array of partial string matches per category.
162 $scope.categoryValueMatch = {}; 162 $scope.categoryValueMatch = {};
163 $scope.categoryValueMatch.builder = ""; 163 $scope.categoryValueMatch.builder = "";
164 $scope.categoryValueMatch.test = ""; 164 $scope.categoryValueMatch.test = "";
165 165
166 // If any defaults were overridden in the URL, get them now. 166 // If any defaults were overridden in the URL, get them now.
167 $scope.queryParameters.load(); 167 $scope.queryParameters.load();
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 'resultsToLoad': $scope.queryParameters.copiers.simple, 335 'resultsToLoad': $scope.queryParameters.copiers.simple,
336 'displayLimitPending': $scope.queryParameters.copiers.simple, 336 'displayLimitPending': $scope.queryParameters.copiers.simple,
337 'showThumbnailsPending': $scope.queryParameters.copiers.simple, 337 'showThumbnailsPending': $scope.queryParameters.copiers.simple,
338 'imageSizePending': $scope.queryParameters.copiers.simple, 338 'imageSizePending': $scope.queryParameters.copiers.simple,
339 'sortColumnSubdict': $scope.queryParameters.copiers.simple, 339 'sortColumnSubdict': $scope.queryParameters.copiers.simple,
340 'sortColumnKey': $scope.queryParameters.copiers.simple, 340 'sortColumnKey': $scope.queryParameters.copiers.simple,
341 341
342 'hiddenResultTypes': $scope.queryParameters.copiers.set, 342 'hiddenResultTypes': $scope.queryParameters.copiers.set,
343 'hiddenConfigs': $scope.queryParameters.copiers.set, 343 'hiddenConfigs': $scope.queryParameters.copiers.set,
344 }; 344 };
345 $scope.queryParameters.map[constants.KEY__EXTRACOLUMN__BUILDER] = 345 $scope.queryParameters.map[constants.KEY__EXTRACOLUMNS__BUILDER] =
346 $scope.queryParameters.copiers.categoryValueMatch; 346 $scope.queryParameters.copiers.categoryValueMatch;
347 $scope.queryParameters.map[constants.KEY__EXTRACOLUMN__TEST] = 347 $scope.queryParameters.map[constants.KEY__EXTRACOLUMNS__TEST] =
348 $scope.queryParameters.copiers.categoryValueMatch; 348 $scope.queryParameters.copiers.categoryValueMatch;
349 349
350 // Loads all parameters into $scope from the URL query string; 350 // Loads all parameters into $scope from the URL query string;
351 // any which are not found within the URL will keep their current value. 351 // any which are not found within the URL will keep their current value.
352 $scope.queryParameters.load = function() { 352 $scope.queryParameters.load = function() {
353 var nameValuePairs = $location.search(); 353 var nameValuePairs = $location.search();
354 angular.forEach($scope.queryParameters.map, 354 angular.forEach($scope.queryParameters.map,
355 function(copier, paramName) { 355 function(copier, paramName) {
356 copier.load(nameValuePairs, paramName); 356 copier.load(nameValuePairs, paramName);
357 } 357 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // another copy of the array. Is there a way we can filter out 404 // another copy of the array. Is there a way we can filter out
405 // the imagePairs as they are displayed, rather than storing multiple 405 // the imagePairs as they are displayed, rather than storing multiple
406 // array copies? (For better performance.) 406 // array copies? (For better performance.)
407 407
408 if ($scope.viewingTab == $scope.defaultTab) { 408 if ($scope.viewingTab == $scope.defaultTab) {
409 409
410 // TODO(epoger): Until we allow the user to reverse sort order, 410 // TODO(epoger): Until we allow the user to reverse sort order,
411 // there are certain columns we want to sort in a different order. 411 // there are certain columns we want to sort in a different order.
412 var doReverse = ( 412 var doReverse = (
413 ($scope.sortColumnKey == 413 ($scope.sortColumnKey ==
414 constants.KEY__DIFFERENCE_DATA__PERCENT_DIFF_PIXELS) || 414 constants.KEY__DIFFERENCES__PERCENT_DIFF_PIXELS) ||
415 ($scope.sortColumnKey == 415 ($scope.sortColumnKey ==
416 constants.KEY__DIFFERENCE_DATA__PERCEPTUAL_DIFF)); 416 constants.KEY__DIFFERENCES__PERCEPTUAL_DIFF));
417 417
418 $scope.filteredImagePairs = 418 $scope.filteredImagePairs =
419 $filter("orderBy")( 419 $filter("orderBy")(
420 $filter("removeHiddenImagePairs")( 420 $filter("removeHiddenImagePairs")(
421 $scope.imagePairs, 421 $scope.imagePairs,
422 $scope.hiddenResultTypes, 422 $scope.hiddenResultTypes,
423 $scope.hiddenConfigs, 423 $scope.hiddenConfigs,
424 $scope.categoryValueMatch.builder, 424 $scope.categoryValueMatch.builder,
425 $scope.categoryValueMatch.test, 425 $scope.categoryValueMatch.test,
426 $scope.viewingTab 426 $scope.viewingTab
(...skipping 23 matching lines...) Expand all
450 * after updateResults(). 450 * after updateResults().
451 */ 451 */
452 $scope.resultsUpdatedCallback = function() { 452 $scope.resultsUpdatedCallback = function() {
453 $scope.renderEndTime = window.performance.now(); 453 $scope.renderEndTime = window.performance.now();
454 $log.debug("renderEndTime: " + $scope.renderEndTime); 454 $log.debug("renderEndTime: " + $scope.renderEndTime);
455 } 455 }
456 456
457 /** 457 /**
458 * Re-sort the displayed results. 458 * Re-sort the displayed results.
459 * 459 *
460 * @param subdict (string): which subdictionary 460 * @param subdict (string): which KEY__IMAGEPAIRS__* subdictionary
461 * (constants.KEY__DIFFERENCE_DATA, constants.KEY__EXPECTATIONS_DATA, 461 * the sort column key is within
462 * constants.KEY__EXTRA_COLUMN_VALUES) the sort column key is within
463 * @param key (string): sort by value associated with this key in subdict 462 * @param key (string): sort by value associated with this key in subdict
464 */ 463 */
465 $scope.sortResultsBy = function(subdict, key) { 464 $scope.sortResultsBy = function(subdict, key) {
466 $scope.sortColumnSubdict = subdict; 465 $scope.sortColumnSubdict = subdict;
467 $scope.sortColumnKey = key; 466 $scope.sortColumnKey = key;
468 $scope.updateResults(); 467 $scope.updateResults();
469 } 468 }
470 469
471 /** 470 /**
472 * For a particular ImagePair, return the value of the column we are 471 * For a particular ImagePair, return the value of the column we are
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 // rebaselining failures in alternative renderModes, but it does work. 569 // rebaselining failures in alternative renderModes, but it does work.
571 // For a better solution, see 570 // For a better solution, see
572 // https://code.google.com/p/skia/issues/detail?id=1748 ('gm: add new 571 // https://code.google.com/p/skia/issues/detail?id=1748 ('gm: add new
573 // result type, RenderModeMismatch') 572 // result type, RenderModeMismatch')
574 var encounteredComparisonConfig = false; 573 var encounteredComparisonConfig = false;
575 574
576 var updatedExpectations = []; 575 var updatedExpectations = [];
577 for (var i = 0; i < imagePairsSubset.length; i++) { 576 for (var i = 0; i < imagePairsSubset.length; i++) {
578 var imagePair = imagePairsSubset[i]; 577 var imagePair = imagePairsSubset[i];
579 var updatedExpectation = {}; 578 var updatedExpectation = {};
580 updatedExpectation[constants.KEY__EXPECTATIONS_DATA] = 579 updatedExpectation[constants.KEY__IMAGEPAIRS__EXPECTATIONS] =
581 imagePair[constants.KEY__EXPECTATIONS_DATA]; 580 imagePair[constants.KEY__IMAGEPAIRS__EXPECTATIONS];
582 updatedExpectation[constants.KEY__EXTRA_COLUMN_VALUES] = 581 updatedExpectation[constants.KEY__IMAGEPAIRS__EXTRACOLUMNS] =
583 imagePair[constants.KEY__EXTRA_COLUMN_VALUES]; 582 imagePair[constants.KEY__IMAGEPAIRS__EXTRACOLUMNS];
584 updatedExpectation[constants.KEY__NEW_IMAGE_URL] = 583 // IMAGE_B_URL contains the actual image (which is now the expectation)
585 imagePair[constants.KEY__IMAGE_B_URL]; 584 updatedExpectation[constants.KEY__IMAGEPAIRS__IMAGE_B_URL] =
586 if (0 == updatedExpectation[constants.KEY__EXTRA_COLUMN_VALUES] 585 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL];
587 [constants.KEY__EXTRACOLUMN__CONFIG] 586 if (0 == updatedExpectation[constants.KEY__IMAGEPAIRS__EXTRACOLUMNS]
587 [constants.KEY__EXTRACOLUMNS__CONFIG]
588 .indexOf('comparison-')) { 588 .indexOf('comparison-')) {
589 encounteredComparisonConfig = true; 589 encounteredComparisonConfig = true;
590 } 590 }
591 591
592 // Advanced settings... 592 // Advanced settings...
593 if (null == updatedExpectation[constants.KEY__EXPECTATIONS_DATA]) { 593 if (null == updatedExpectation[constants.KEY__IMAGEPAIRS__EXPECTATIONS]) {
594 updatedExpectation[constants.KEY__EXPECTATIONS_DATA] = {}; 594 updatedExpectation[constants.KEY__IMAGEPAIRS__EXPECTATIONS] = {};
595 } 595 }
596 updatedExpectation[constants.KEY__EXPECTATIONS_DATA] 596 updatedExpectation[constants.KEY__IMAGEPAIRS__EXPECTATIONS]
597 [constants.KEY__EXPECTATIONS__REVIEWED] = 597 [constants.KEY__EXPECTATIONS__REVIEWED] =
598 $scope.submitAdvancedSettings[ 598 $scope.submitAdvancedSettings[
599 constants.KEY__EXPECTATIONS__REVIEWED]; 599 constants.KEY__EXPECTATIONS__REVIEWED];
600 if (true == $scope.submitAdvancedSettings[ 600 if (true == $scope.submitAdvancedSettings[
601 constants.KEY__EXPECTATIONS__IGNOREFAILURE]) { 601 constants.KEY__EXPECTATIONS__IGNOREFAILURE]) {
602 // if it's false, don't send it at all (just keep the default) 602 // if it's false, don't send it at all (just keep the default)
603 updatedExpectation[constants.KEY__EXPECTATIONS_DATA] 603 updatedExpectation[constants.KEY__IMAGEPAIRS__EXPECTATIONS]
604 [constants.KEY__EXPECTATIONS__IGNOREFAILURE] = true; 604 [constants.KEY__EXPECTATIONS__IGNOREFAILURE] = true;
605 } 605 }
606 updatedExpectation[constants.KEY__EXPECTATIONS_DATA] 606 updatedExpectation[constants.KEY__IMAGEPAIRS__EXPECTATIONS]
607 [constants.KEY__EXPECTATIONS__BUGS] = bugs; 607 [constants.KEY__EXPECTATIONS__BUGS] = bugs;
608 608
609 updatedExpectations.push(updatedExpectation); 609 updatedExpectations.push(updatedExpectation);
610 } 610 }
611 if (encounteredComparisonConfig) { 611 if (encounteredComparisonConfig) {
612 alert("Approval failed -- you cannot approve results with config " + 612 alert("Approval failed -- you cannot approve results with config " +
613 "type comparison-*"); 613 "type comparison-*");
614 $scope.submitPending = false; 614 $scope.submitPending = false;
615 return; 615 return;
616 } 616 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 * Depending on which diff this is (whitediffs, pixeldiffs, etc.) this 820 * Depending on which diff this is (whitediffs, pixeldiffs, etc.) this
821 * will be relative to different base URLs. 821 * will be relative to different base URLs.
822 * 822 *
823 * We must keep this function in sync with _get_difference_locator() in 823 * We must keep this function in sync with _get_difference_locator() in
824 * ../imagediffdb.py 824 * ../imagediffdb.py
825 * 825 *
826 * @param imagePair: ImagePair to generate image diff URL for 826 * @param imagePair: ImagePair to generate image diff URL for
827 */ 827 */
828 $scope.getImageDiffRelativeUrl = function(imagePair) { 828 $scope.getImageDiffRelativeUrl = function(imagePair) {
829 var before = 829 var before =
830 imagePair[constants.KEY__IMAGE_A_URL] + "-vs-" + 830 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "-vs-" +
831 imagePair[constants.KEY__IMAGE_B_URL]; 831 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL];
832 return before.replace(/[^\w\-]/g, "_") + ".png"; 832 return before.replace(/[^\w\-]/g, "_") + ".png";
833 } 833 }
834 834
835 } 835 }
836 ); 836 );
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698