epoger@google.com | f9d134d | 2013-09-27 15:02:44 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | |
| 3 | <html ng-app="Loader"> |
| 4 | |
| 5 | <head> |
| 6 | <title>Current GM Results</title> |
| 7 | <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.js"></script> |
| 8 | <script src="loader.js"></script> |
| 9 | </head> |
| 10 | |
| 11 | <body> |
| 12 | <div ng-controller="Loader.Controller"> |
| 13 | |
| 14 | <!-- TODO(epoger): Add a warning banner if the server is running in |
| 15 | --export mode |
| 16 | --> |
| 17 | |
epoger@google.com | afaad3d | 2013-09-30 15:06:25 +0000 | [diff] [blame^] | 18 | <!-- TODO(epoger): Add some indication of how old the |
| 19 | expected/actual data is --> |
| 20 | |
epoger@google.com | f9d134d | 2013-09-27 15:02:44 +0000 | [diff] [blame] | 21 | Settings: |
| 22 | <ul> |
| 23 | <!-- TODO(epoger): Now that we get multiple result types in a single |
| 24 | fetch, modify the UI: add a column showing resultType, and allow |
| 25 | the user to sort/filter on that column just like all the |
| 26 | others. --> |
| 27 | <li>show results of type |
| 28 | <select ng-model="showResultsOfType" |
| 29 | ng-init="showResultsOfType='failed'"> |
epoger@google.com | afaad3d | 2013-09-30 15:06:25 +0000 | [diff] [blame^] | 30 | <option ng-repeat="(resultType, count) in categories['resultType']" |
| 31 | value="{{resultType}}"> |
| 32 | {{resultType}} ({{count}}) |
| 33 | </option> |
| 34 | </select> |
| 35 | <!-- |
epoger@google.com | f9d134d | 2013-09-27 15:02:44 +0000 | [diff] [blame] | 36 | TODO(epoger): See results.py: for now, I have disabled |
| 37 | returning succeeded tests as part of the JSON, because it |
| 38 | makes the returned JSON too big (and slows down the client). |
epoger@google.com | afaad3d | 2013-09-30 15:06:25 +0000 | [diff] [blame^] | 39 | |
| 40 | Also, we should use some sort of lazy-loading technique |
| 41 | (e.g. http://www.appelsiini.net/projects/lazyload ), so that |
| 42 | the images are only loaded as they become viewable... |
| 43 | that will help with long lists like resultType='no-comparison'. |
| 44 | --> |
| 45 | <br> |
| 46 | TODO(epoger): 'no-comparison' will probably take forever; |
| 47 | see HTML source for details |
| 48 | <br> |
| 49 | TODO(epoger): 'succeeded' will not show any results; |
| 50 | see HTML source for details |
epoger@google.com | f9d134d | 2013-09-27 15:02:44 +0000 | [diff] [blame] | 51 | </li> |
| 52 | <li>image size |
epoger@google.com | afaad3d | 2013-09-30 15:06:25 +0000 | [diff] [blame^] | 53 | <input type="text" ng-model="imageSizePending" |
| 54 | ng-init="imageSizePending=100; imageSize=100" |
epoger@google.com | f9d134d | 2013-09-27 15:02:44 +0000 | [diff] [blame] | 55 | maxlength="4"/> |
epoger@google.com | afaad3d | 2013-09-30 15:06:25 +0000 | [diff] [blame^] | 56 | <button ng:click="imageSize=imageSizePending">apply</button> |
epoger@google.com | f9d134d | 2013-09-27 15:02:44 +0000 | [diff] [blame] | 57 | </li> |
| 58 | </ul> |
| 59 | |
| 60 | <p> |
epoger@google.com | afaad3d | 2013-09-30 15:06:25 +0000 | [diff] [blame^] | 61 | Click on the column header radio buttons to re-sort by that column...<br> |
epoger@google.com | f9d134d | 2013-09-27 15:02:44 +0000 | [diff] [blame] | 62 | <!-- TODO(epoger): Show some sort of "loading" message, instead of |
| 63 | an empty table, while the data is loading. Otherwise, if there are |
| 64 | a lot of failures and it takes a long time to load them, the user |
| 65 | might think there are NO failures and leave the page! --> |
| 66 | <table border="1"> |
| 67 | <tr> |
epoger@google.com | afaad3d | 2013-09-30 15:06:25 +0000 | [diff] [blame^] | 68 | <th><input ng-model="sortColumn" name="sortColumnRadio" type="radio" value="builder">Builder</input></th> |
| 69 | <th><input ng-model="sortColumn" name="sortColumnRadio" type="radio" value="test">Test</input></th> |
| 70 | <th><input ng-model="sortColumn" name="sortColumnRadio" type="radio" value="config">Config</input></th> |
| 71 | <th><input ng-model="sortColumn" name="sortColumnRadio" type="radio" value="expectedHashDigest">Expected Image</input></th> |
| 72 | <th><input ng-model="sortColumn" name="sortColumnRadio" type="radio" value="actualHashDigest">Actual Image</input></th> |
epoger@google.com | f9d134d | 2013-09-27 15:02:44 +0000 | [diff] [blame] | 73 | <!-- TODO(epoger): Add more columns, such as... |
| 74 | pixel diff |
| 75 | notes/bugs |
| 76 | ignoreFailure boolean |
| 77 | --> |
| 78 | </tr> |
| 79 | <!-- TODO(epoger): improve the column sorting, as per |
| 80 | http://jsfiddle.net/vojtajina/js64b/14/ --> |
epoger@google.com | afaad3d | 2013-09-30 15:06:25 +0000 | [diff] [blame^] | 81 | <tr ng-repeat="result in testData | filter: { resultType: showResultsOfType } | orderBy: sortColumn"> |
epoger@google.com | f9d134d | 2013-09-27 15:02:44 +0000 | [diff] [blame] | 82 | <td>{{result.builder}}</td> |
| 83 | <td>{{result.test}}</td> |
| 84 | <td>{{result.config}}</td> |
| 85 | <td> |
| 86 | <a target="_blank" href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.expectedHashType}}/{{result.test}}/{{result.expectedHashDigest}}.png"> |
| 87 | <img width="{{imageSize}}" src="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.expectedHashType}}/{{result.test}}/{{result.expectedHashDigest}}.png"/> |
| 88 | </a> |
| 89 | </td> |
| 90 | <td> |
| 91 | <a target="_blank" href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.actualHashType}}/{{result.test}}/{{result.actualHashDigest}}.png"> |
| 92 | <img width="{{imageSize}}" src="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.actualHashType}}/{{result.test}}/{{result.actualHashDigest}}.png"/> |
| 93 | </a> |
| 94 | </td> |
| 95 | </tr> |
| 96 | </table> |
| 97 | </div> |
| 98 | |
| 99 | <!-- TODO(epoger): Can we get the base URLs (commondatastorage and |
| 100 | issues list) from |
| 101 | http://skia.googlecode.com/svn/buildbot/site_config/global_variables.json |
| 102 | ? I tried importing the |
| 103 | http://skia.googlecode.com/svn/buildbot/skia_tools.js script and using |
| 104 | that to do so, but I got Access-Control-Allow-Origin errors. |
| 105 | --> |
| 106 | |
| 107 | </body> |
| 108 | </html> |