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