| 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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1045 * Returns the last path component of image diff URL for a given ImagePair. | 1045 * Returns the last path component of image diff URL for a given ImagePair. |
| 1046 * | 1046 * |
| 1047 * Depending on which diff this is (whitediffs, pixeldiffs, etc.) this | 1047 * Depending on which diff this is (whitediffs, pixeldiffs, etc.) this |
| 1048 * will be relative to different base URLs. | 1048 * will be relative to different base URLs. |
| 1049 * | 1049 * |
| 1050 * We must keep this function in sync with _get_difference_locator() in | 1050 * We must keep this function in sync with _get_difference_locator() in |
| 1051 * ../imagediffdb.py | 1051 * ../imagediffdb.py |
| 1052 * | 1052 * |
| 1053 * @param imagePair: ImagePair to generate image diff URL for | 1053 * @param imagePair: ImagePair to generate image diff URL for |
| 1054 */ | 1054 */ |
| 1055 // TODO (stephana): this is a temporary fix. A fix is in the works |
| 1056 // to get rid of this function and include the URL in the data |
| 1057 // sent from the backend. |
| 1058 |
| 1055 $scope.getImageDiffRelativeUrl = function(imagePair) { | 1059 $scope.getImageDiffRelativeUrl = function(imagePair) { |
| 1056 var before = | 1060 var before = |
| 1057 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "-vs-" + | 1061 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "_png-vs-" + |
| 1058 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL]; | 1062 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL] + "_png"; |
| 1059 return before.replace(/[^\w\-]/g, "_") + ".png"; | 1063 return before.replace(/[^\w\-]/g, "_") + ".png"; |
| 1060 }; | 1064 }; |
| 1061 | 1065 |
| 1062 } | 1066 } |
| 1063 ); | 1067 ); |
| OLD | NEW |