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

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

Issue 235993002: rebaseline_server: fix sorting by perceptual diff column (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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 | gm/rebaseline_server/static/view.html » ('j') | 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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__EXTRACOLUMNHEADERS];
102 $scope.imagePairs = data[constants.KEY__IMAGEPAIRS]; 102 $scope.imagePairs = data[constants.KEY__IMAGEPAIRS];
103 $scope.imageSets = data[constants.KEY__IMAGESETS]; 103 $scope.imageSets = data[constants.KEY__IMAGESETS];
104 $scope.sortColumnSubdict = constants.KEY__DIFFERENCE_DATA; 104 $scope.sortColumnSubdict = constants.KEY__DIFFERENCE_DATA;
105 $scope.sortColumnKey = constants.KEY__DIFFERENCE_DATA__WEIGHTED_DIFF; 105 $scope.sortColumnKey = constants.KEY__DIFFERENCE_DATA__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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // array copies? (For better performance.) 404 // array copies? (For better performance.)
405 405
406 if ($scope.viewingTab == $scope.defaultTab) { 406 if ($scope.viewingTab == $scope.defaultTab) {
407 407
408 // TODO(epoger): Until we allow the user to reverse sort order, 408 // TODO(epoger): Until we allow the user to reverse sort order,
409 // there are certain columns we want to sort in a different order. 409 // there are certain columns we want to sort in a different order.
410 var doReverse = ( 410 var doReverse = (
411 ($scope.sortColumnKey == 411 ($scope.sortColumnKey ==
412 constants.KEY__DIFFERENCE_DATA__PERCENT_DIFF_PIXELS) || 412 constants.KEY__DIFFERENCE_DATA__PERCENT_DIFF_PIXELS) ||
413 ($scope.sortColumnKey == 413 ($scope.sortColumnKey ==
414 constants.KEY__DIFFERENCE_DATA__WEIGHTED_DIFF)); 414 constants.KEY__DIFFERENCE_DATA__PERCEPTUAL_DIFF));
415 415
416 $scope.filteredImagePairs = 416 $scope.filteredImagePairs =
417 $filter("orderBy")( 417 $filter("orderBy")(
418 $filter("removeHiddenImagePairs")( 418 $filter("removeHiddenImagePairs")(
419 $scope.imagePairs, 419 $scope.imagePairs,
420 $scope.hiddenResultTypes, 420 $scope.hiddenResultTypes,
421 $scope.hiddenConfigs, 421 $scope.hiddenConfigs,
422 $scope.categoryValueMatch.builder, 422 $scope.categoryValueMatch.builder,
423 $scope.categoryValueMatch.test, 423 $scope.categoryValueMatch.test,
424 $scope.viewingTab 424 $scope.viewingTab
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 */ 803 */
804 $scope.getImageDiffRelativeUrl = function(imagePair) { 804 $scope.getImageDiffRelativeUrl = function(imagePair) {
805 var before = 805 var before =
806 imagePair[constants.KEY__IMAGE_A_URL] + "-vs-" + 806 imagePair[constants.KEY__IMAGE_A_URL] + "-vs-" +
807 imagePair[constants.KEY__IMAGE_B_URL]; 807 imagePair[constants.KEY__IMAGE_B_URL];
808 return before.replace(/[^\w\-]/g, "_") + ".png"; 808 return before.replace(/[^\w\-]/g, "_") + ".png";
809 } 809 }
810 810
811 } 811 }
812 ); 812 );
OLDNEW
« no previous file with comments | « no previous file | gm/rebaseline_server/static/view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698