OLD | NEW |
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 ); | 121 ); |
122 | 122 |
123 | 123 |
124 Loader.controller( | 124 Loader.controller( |
125 'Loader.Controller', | 125 'Loader.Controller', |
126 function($scope, $http, $filter, $location, $log, $timeout, constants) { | 126 function($scope, $http, $filter, $location, $log, $timeout, constants) { |
127 $scope.readyToDisplay = false; | 127 $scope.readyToDisplay = false; |
128 $scope.constants = constants; | 128 $scope.constants = constants; |
129 $scope.windowTitle = "Loading GM Results..."; | 129 $scope.windowTitle = "Loading GM Results..."; |
130 $scope.setADir = $location.search().setADir; | 130 $scope.setADir = $location.search().setADir; |
| 131 $scope.setASection = $location.search().setASection; |
131 $scope.setBDir = $location.search().setBDir; | 132 $scope.setBDir = $location.search().setBDir; |
| 133 $scope.setBSection = $location.search().setBSection; |
132 $scope.loadingMessage = "please wait..."; | 134 $scope.loadingMessage = "please wait..."; |
133 | 135 |
134 /** | 136 /** |
135 * On initial page load, load a full dictionary of results. | 137 * On initial page load, load a full dictionary of results. |
136 * Once the dictionary is loaded, unhide the page elements so they can | 138 * Once the dictionary is loaded, unhide the page elements so they can |
137 * render the data. | 139 * render the data. |
138 */ | 140 */ |
139 var liveQueryUrl = | 141 var liveQueryUrl = |
140 "/live-results/setADir=" + encodeURIComponent($scope.setADir) + | 142 "/live-results/setADir=" + encodeURIComponent($scope.setADir) + |
141 "&setBDir=" + encodeURIComponent($scope.setBDir); | 143 "&setASection=" + encodeURIComponent($scope.setASection) + |
| 144 "&setBDir=" + encodeURIComponent($scope.setBDir) + |
| 145 "&setBSection=" + encodeURIComponent($scope.setBSection); |
142 $http.get(liveQueryUrl).success( | 146 $http.get(liveQueryUrl).success( |
143 function(data, status, header, config) { | 147 function(data, status, header, config) { |
144 var dataHeader = data[constants.KEY__ROOT__HEADER]; | 148 var dataHeader = data[constants.KEY__ROOT__HEADER]; |
145 if (dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] != | 149 if (dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] != |
146 constants.VALUE__HEADER__SCHEMA_VERSION) { | 150 constants.VALUE__HEADER__SCHEMA_VERSION) { |
147 $scope.loadingMessage = "ERROR: Got JSON file with schema version " | 151 $scope.loadingMessage = "ERROR: Got JSON file with schema version " |
148 + dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] | 152 + dataHeader[constants.KEY__HEADER__SCHEMA_VERSION] |
149 + " but expected schema version " | 153 + " but expected schema version " |
150 + constants.VALUE__HEADER__SCHEMA_VERSION; | 154 + constants.VALUE__HEADER__SCHEMA_VERSION; |
151 } else if (dataHeader[constants.KEY__HEADER__IS_STILL_LOADING]) { | 155 } else if (dataHeader[constants.KEY__HEADER__IS_STILL_LOADING]) { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // TODO(epoger): Special handling for RESULT_TYPE column: | 249 // TODO(epoger): Special handling for RESULT_TYPE column: |
246 // by default, show only KEY__RESULT_TYPE__FAILED results | 250 // by default, show only KEY__RESULT_TYPE__FAILED results |
247 $scope.showingColumnValues[constants.KEY__EXTRACOLUMNS__RESULT_TYPE] =
{}; | 251 $scope.showingColumnValues[constants.KEY__EXTRACOLUMNS__RESULT_TYPE] =
{}; |
248 $scope.showingColumnValues[constants.KEY__EXTRACOLUMNS__RESULT_TYPE][ | 252 $scope.showingColumnValues[constants.KEY__EXTRACOLUMNS__RESULT_TYPE][ |
249 constants.KEY__RESULT_TYPE__FAILED] = true; | 253 constants.KEY__RESULT_TYPE__FAILED] = true; |
250 | 254 |
251 // Set up mapping for URL parameters. | 255 // Set up mapping for URL parameters. |
252 // parameter name -> copier object to load/save parameter value | 256 // parameter name -> copier object to load/save parameter value |
253 $scope.queryParameters.map = { | 257 $scope.queryParameters.map = { |
254 'setADir': $scope.queryParameters.copiers.simple, | 258 'setADir': $scope.queryParameters.copiers.simple, |
| 259 'setASection': $scope.queryParameters.copiers.simple, |
255 'setBDir': $scope.queryParameters.copiers.simple, | 260 'setBDir': $scope.queryParameters.copiers.simple, |
| 261 'setBSection': $scope.queryParameters.copiers.simple, |
256 'displayLimitPending': $scope.queryParameters.copiers.simple, | 262 'displayLimitPending': $scope.queryParameters.copiers.simple, |
257 'showThumbnailsPending': $scope.queryParameters.copiers.simple, | 263 'showThumbnailsPending': $scope.queryParameters.copiers.simple, |
258 'mergeIdenticalRowsPending': $scope.queryParameters.copiers.simple, | 264 'mergeIdenticalRowsPending': $scope.queryParameters.copiers.simple, |
259 'imageSizePending': $scope.queryParameters.copiers.simple, | 265 'imageSizePending': $scope.queryParameters.copiers.simple, |
260 'sortColumnSubdict': $scope.queryParameters.copiers.simple, | 266 'sortColumnSubdict': $scope.queryParameters.copiers.simple, |
261 'sortColumnKey': $scope.queryParameters.copiers.simple, | 267 'sortColumnKey': $scope.queryParameters.copiers.simple, |
262 }; | 268 }; |
263 // Some parameters are handled differently based on whether they USE_F
REEFORM_FILTER. | 269 // Some parameters are handled differently based on whether they USE_F
REEFORM_FILTER. |
264 angular.forEach( | 270 angular.forEach( |
265 $scope.filterableColumnNames, | 271 $scope.filterableColumnNames, |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 */ | 1032 */ |
1027 $scope.getImageDiffRelativeUrl = function(imagePair) { | 1033 $scope.getImageDiffRelativeUrl = function(imagePair) { |
1028 var before = | 1034 var before = |
1029 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "-vs-" + | 1035 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "-vs-" + |
1030 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL]; | 1036 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL]; |
1031 return before.replace(/[^\w\-]/g, "_") + ".png"; | 1037 return before.replace(/[^\w\-]/g, "_") + ".png"; |
1032 } | 1038 } |
1033 | 1039 |
1034 } | 1040 } |
1035 ); | 1041 ); |
OLD | NEW |