1 /* 2 * Constants used by our imagediff-viewing Javascript code. 3 */ 4 var module = angular.module( 5 'ConstantsModule', 6 [] 7 ); 8 9 module.constant('constants', (function() { 10 return { 11 // NOTE: Keep these in sync with ../column.py 12 KEY__EXTRACOLUMNHEADERS__HEADER_TEXT: 'headerText', 13 KEY__EXTRACOLUMNHEADERS__HEADER_URL: 'headerUrl', 14 KEY__EXTRACOLUMNHEADERS__IS_FILTERABLE: 'isFilterable', 15 KEY__EXTRACOLUMNHEADERS__IS_SORTABLE: 'isSortable', 16 KEY__EXTRACOLUMNHEADERS__VALUES_AND_COUNTS: 'valuesAndCounts', 17 18 // NOTE: Keep these in sync with ../imagediffdb.py 19 KEY__DIFFERENCES__MAX_DIFF_PER_CHANNEL: 'maxDiffPerChannel', 20 KEY__DIFFERENCES__NUM_DIFF_PIXELS: 'numDifferingPixels', 21 KEY__DIFFERENCES__PERCENT_DIFF_PIXELS: 'percentDifferingPixels', 22 KEY__DIFFERENCES__PERCEPTUAL_DIFF: 'perceptualDifference', 23 24 // NOTE: Keep these in sync with ../imagepair.py 25 KEY__IMAGEPAIRS__DIFFERENCES: 'differenceData', 26 KEY__IMAGEPAIRS__EXPECTATIONS: 'expectations', 27 KEY__IMAGEPAIRS__EXTRACOLUMNS: 'extraColumns', 28 KEY__IMAGEPAIRS__IMAGE_A_URL: 'imageAUrl', 29 KEY__IMAGEPAIRS__IMAGE_B_URL: 'imageBUrl', 30 KEY__IMAGEPAIRS__IS_DIFFERENT: 'isDifferent', 31 32 // NOTE: Keep these in sync with ../imagepairset.py 33 KEY__ROOT__EXTRACOLUMNHEADERS: 'extraColumnHeaders', 34 KEY__ROOT__HEADER: 'header', 35 KEY__ROOT__IMAGEPAIRS: 'imagePairs', 36 KEY__ROOT__IMAGESETS: 'imageSets', 37 // 38 KEY__IMAGESETS__FIELD__BASE_URL: 'baseUrl', 39 KEY__IMAGESETS__FIELD__DESCRIPTION: 'description', 40 KEY__IMAGESETS__SET__DIFFS: 'diffs', 41 KEY__IMAGESETS__SET__IMAGE_A: 'imageA', 42 KEY__IMAGESETS__SET__IMAGE_B: 'imageB', 43 KEY__IMAGESETS__SET__WHITEDIFFS: 'whiteDiffs', 44 45 // NOTE: Keep these in sync with ../results.py 46 KEY__EXPECTATIONS__BUGS: 'bugs', 47 KEY__EXPECTATIONS__IGNOREFAILURE: 'ignore-failure', 48 KEY__EXPECTATIONS__REVIEWED: 'reviewed-by-human', 49 // 50 KEY__EXTRACOLUMNS__BUILDER: 'builder', 51 KEY__EXTRACOLUMNS__CONFIG: 'config', 52 KEY__EXTRACOLUMNS__RESULT_TYPE: 'resultType', 53 KEY__EXTRACOLUMNS__TEST: 'test', 54 // 55 KEY__HEADER__DATAHASH: 'dataHash', 56 KEY__HEADER__IS_EDITABLE: 'isEditable', 57 KEY__HEADER__IS_EXPORTED: 'isExported', 58 KEY__HEADER__IS_STILL_LOADING: 'resultsStillLoading', 59 KEY__HEADER__RESULTS_ALL: 'all', 60 KEY__HEADER__RESULTS_FAILURES: 'failures', 61 KEY__HEADER__SCHEMA_VERSION: 'schemaVersion', 62 KEY__HEADER__TIME_NEXT_UPDATE_AVAILABLE: 'timeNextUpdateAvailable', 63 KEY__HEADER__TIME_UPDATED: 'timeUpdated', 64 KEY__HEADER__TYPE: 'type', 65 VALUE__HEADER__SCHEMA_VERSION: 3, 66 // 67 KEY__RESULT_TYPE__FAILED: 'failed', 68 KEY__RESULT_TYPE__FAILUREIGNORED: 'failure-ignored', 69 KEY__RESULT_TYPE__NOCOMPARISON: 'no-comparison', 70 KEY__RESULT_TYPE__SUCCEEDED: 'succeeded', 71 72 // NOTE: Keep these in sync with ../server.py 73 KEY__EDITS__MODIFICATIONS: 'modifications', 74 KEY__EDITS__OLD_RESULTS_HASH: 'oldResultsHash', 75 KEY__EDITS__OLD_RESULTS_TYPE: 'oldResultsType', 76 77 // These are just used on the client side, no need to sync with server code. 78 KEY__IMAGEPAIRS__ROWSPAN: 'rowspan', 79 } 80 })()) 81