1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
<!DOCTYPE html>
<html ng-app="Loader" ng-controller="Loader.Controller">
<head>
<title ng-bind="windowTitle"></title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.js"></script>
<script src="loader.js"></script>
<link rel="stylesheet" href="view.css">
</head>
<body>
<h2>
Instructions, roadmap, etc. are at
<a href="http://tinyurl.com/SkiaRebaselineServer">
http://tinyurl.com/SkiaRebaselineServer
</a>
</h2>
<em>
{{loadingMessage}}
</em>
<div ng-hide="!categories"><!-- everything: hide until data is loaded -->
<div class="warning-div"
ng-hide="!(header.isEditable && header.isExported)">
WARNING! These results are editable and exported, so any user
who can connect to this server over the network can modify them.
</div>
<div ng-hide="!(header.timeUpdated)">
Results current as of {{localTimeString(header.timeUpdated)}}
</div>
<div><!-- tabs -->
<div class="tab-spacer" ng-repeat="tab in tabs">
<div class="tab-{{tab == viewingTab}}"
ng-click="setViewingTab(tab)">
{{tab}} ({{numResultsPerTab[tab]}})
</div>
<div class="tab-spacer">
</div>
</div>
</div><!-- tabs -->
<div class="tab-main"><!-- main display area of selected tab -->
<br>
<!-- We only show the filters/settings table on the Unfiled tab. -->
<table ng-hide="viewingTab != defaultTab" border="1">
<tr>
<th colspan="4">
Filters
</th>
<th>
Settings
</th>
</tr>
<tr valign="top">
<!-- TODO(epoger): make this an ng-repeat over resultType, config, etc? -->
<td>
resultType<br>
<label ng-repeat="(resultType, count) in categories['resultType'] track by $index">
<input type="checkbox"
name="resultTypes"
value="{{resultType}}"
ng-checked="!isValueInSet(resultType, hiddenResultTypes)"
ng-click="toggleValueInSet(resultType, hiddenResultTypes); setUpdatesPending(true)">
{{resultType}} ({{count}})<br>
</label>
<button ng-click="hiddenResultTypes = {}; updateResults()">
all
</button>
<button ng-click="hiddenResultTypes = {}; toggleValuesInSet(allResultTypes, hiddenResultTypes); updateResults()">
none
</button>
<button ng-click="toggleValuesInSet(allResultTypes, hiddenResultTypes); updateResults()">
toggle
</button>
</td>
<td ng-repeat="category in ['builder', 'test']">
{{category}}
<br>
<input type="text"
ng-model="categoryValueMatch[category]"
ng-change="setUpdatesPending(true)"/>
<br>
<button ng-click="setCategoryValueMatch(category, '')"
ng-disabled="('' == categoryValueMatch[category])">
clear (show all)
</button>
</td>
<td>
config<br>
<label ng-repeat="(config, count) in categories['config'] track by $index">
<input type="checkbox"
name="configs"
value="{{config}}"
ng-checked="!isValueInSet(config, hiddenConfigs)"
ng-click="toggleValueInSet(config, hiddenConfigs); setUpdatesPending(true)">
{{config}} ({{count}})<br>
</label>
<button ng-click="hiddenConfigs = {}; updateResults()">
all
</button>
<button ng-click="hiddenConfigs = {}; toggleValuesInSet(allConfigs, hiddenConfigs); updateResults()">
none
</button>
<button ng-click="toggleValuesInSet(allConfigs, hiddenConfigs); updateResults()">
toggle
</button>
</td>
<td><table>
<tr><td>
Image size
<input type="text" ng-model="imageSizePending"
ng-init="imageSizePending=100"
ng-change="areUpdatesPending = true"
maxlength="4"/>
</td></tr>
<tr><td>
Max records to display
<input type="text" ng-model="displayLimitPending"
ng-init="displayLimitPending=50"
ng-change="areUpdatesPending = true"
maxlength="4"/>
</td></tr>
<tr><td>
<button class="update-results-button"
ng-click="updateResults()"
ng-disabled="!areUpdatesPending">
Update Results
</button>
</td></tr>
</tr></table></td>
</tr>
</table>
<p>
<!-- Submission UI that we only show in the Pending Approval tab. -->
<div ng-hide="'Pending Approval' != viewingTab">
<div style="display:inline-block">
<button style="font-size:20px"
ng-click="submitApprovals(filteredTestData)"
ng-disabled="submitPending || (filteredTestData.length == 0)">
Update these {{filteredTestData.length}} expectations on the server
</button>
</div>
<div style="display:inline-block">
<div style="font-size:20px"
ng-hide="!submitPending">
Submitting, please wait...
</div>
</div>
<div>
Advanced settings...
<input type="checkbox" ng-model="showSubmitAdvancedSettings">
show
<ul ng-hide="!showSubmitAdvancedSettings">
<li ng-repeat="setting in ['reviewed-by-human', 'ignore-failure']">
{{setting}}
<input type="checkbox" ng-model="submitAdvancedSettings[setting]">
</li>
<li ng-repeat="setting in ['bug']">
{{setting}}
<input type="text" ng-model="submitAdvancedSettings[setting]">
</li>
</ul>
</div>
</div>
<p>
<table border="0"><tr><td> <!-- table holding results header + results table -->
<table border="0" width="100%"> <!-- results header -->
<tr>
<td>
Found {{filteredTestData.length}} matches;
<span ng-hide="filteredTestData.length <= limitedTestData.length">
displaying the first {{limitedTestData.length}}
</span>
<span ng-hide="filteredTestData.length > limitedTestData.length">
displaying them all
</span>
<br>
(click on the column header radio buttons to re-sort by that column)
</td>
<td align="right">
<div>
all tests shown:
<button ng-click="selectAllItems()">
select
</button>
<button ng-click="clearAllItems()">
clear
</button>
<button ng-click="toggleAllItems()">
toggle
</button>
</div>
<div ng-repeat="otherTab in tabs">
<button ng-click="moveSelectedItemsToTab(otherTab)"
ng-disabled="selectedItems.length == 0"
ng-hide="otherTab == viewingTab">
move {{selectedItems.length}} selected tests to {{otherTab}} tab
</button>
</div>
</td>
</tr>
</table> <!-- results header -->
</td></tr><tr><td>
<table border="1"> <!-- results -->
<tr>
<!-- Most column headers are displayed in a common fashion... -->
<th ng-repeat="categoryName in ['resultType', 'builder', 'test', 'config']">
<input type="radio"
name="sortColumnRadio"
value="{{categoryName}}"
ng-checked="(sortColumn == categoryName)"
ng-click="sortResultsBy(categoryName)">
{{categoryName}}
</th>
<!-- ... but there are a few columns where we display things differently. -->
<th>
<input type="radio"
name="sortColumnRadio"
value="bugs"
ng-checked="(sortColumn == 'bugs')"
ng-click="sortResultsBy('bugs')">
bugs
</th>
<th>
<input type="radio"
name="sortColumnRadio"
value="expectedHashDigest"
ng-checked="(sortColumn == 'expectedHashDigest')"
ng-click="sortResultsBy('expectedHashDigest')">
expected image
</th>
<th>
<input type="radio"
name="sortColumnRadio"
value="actualHashDigest"
ng-checked="(sortColumn == 'actualHashDigest')"
ng-click="sortResultsBy('actualHashDigest')">
actual image
</th>
<th>
<input type="radio"
name="sortColumnRadio"
value="percentDifferingPixels"
ng-checked="(sortColumn == 'percentDifferingPixels')"
ng-click="sortResultsBy('percentDifferingPixels')">
differing pixels
</th>
<th>
<input type="radio"
name="sortColumnRadio"
value="weightedDiffMeasure"
ng-checked="(sortColumn == 'weightedDiffMeasure')"
ng-click="sortResultsBy('weightedDiffMeasure')">
per-channel deltas
</th>
<th>
<!-- item-selection checkbox column -->
</th>
</tr>
<!-- For most columns... if the user clicks on the cell, and we are on
the default tab, update the filter to only show results with the
same value for this category.
This is made a bit tricky by the fact that AngularJS expressions
do not allow control flow statements. See
http://docs.angularjs.org/guide/expression -->
<tr ng-repeat="result in limitedTestData">
<td ng-click="(viewingTab != defaultTab) || showOnlyResultType(result.resultType)">
{{result.resultType}}
</td>
<td ng-repeat="categoryName in ['builder', 'test']"
ng-click="(viewingTab != defaultTab) || setCategoryValueMatch(categoryName, result[categoryName])">
{{result[categoryName]}}
</td>
<td ng-click="(viewingTab != defaultTab) || showOnlyConfig(result.config)">
{{result.config}}
</td>
<td>
<a ng-repeat="bug in result['bugs']"
href="https://code.google.com/p/skia/issues/detail?id={{bug}}"
target="_blank">
{{bug}}
</a>
</td>
<!-- expected image -->
<td valign="top">
<a target="_blank" href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.expectedHashType}}/{{result.test}}/{{result.expectedHashDigest}}.png">
<img width="{{imageSize}}" src="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.expectedHashType}}/{{result.test}}/{{result.expectedHashDigest}}.png"/>
</a>
</td>
<!-- actual image -->
<td valign="top">
<a target="_blank" href="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.actualHashType}}/{{result.test}}/{{result.actualHashDigest}}.png">
<img width="{{imageSize}}" src="http://chromium-skia-gm.commondatastorage.googleapis.com/gm/{{result.actualHashType}}/{{result.test}}/{{result.actualHashDigest}}.png"/>
</a>
</td>
<!-- whitediffs: every differing pixel shown in white -->
<td valign="top">
<div ng-hide="result.expectedHashDigest == result.actualHashDigest">
<a target="_blank" href="/static/generated-images/whitediffs/{{result.expectedHashDigest}}-vs-{{result.actualHashDigest}}.png">
<img width="{{imageSize}}" src="/static/generated-images/whitediffs/{{result.expectedHashDigest}}-vs-{{result.actualHashDigest}}.png"/>
</a><br>
{{result.percentDifferingPixels.toFixed(4)}}%
</div>
<div ng-hide="result.expectedHashDigest != result.actualHashDigest"
style="text-align:center">
–none–
</div>
</td>
<!-- diffs: per-channel RGB deltas -->
<td valign="top">
<div ng-hide="result.expectedHashDigest == result.actualHashDigest">
<a target="_blank" href="/static/generated-images/diffs/{{result.expectedHashDigest}}-vs-{{result.actualHashDigest}}.png">
<img width="{{imageSize}}" src="/static/generated-images/diffs/{{result.expectedHashDigest}}-vs-{{result.actualHashDigest}}.png"/>
</a><br>
{{result.weightedDiffMeasure.toFixed(4)}}%
</div>
<div ng-hide="result.expectedHashDigest != result.actualHashDigest"
style="text-align:center">
–none–
</div>
</td>
<td>
<input type="checkbox"
name="rowSelect"
value="{{result.index}}"
ng-checked="isValueInArray(result.index, selectedItems)"
ng-click="toggleValueInArray(result.index, selectedItems)">
</tr>
</table> <!-- results -->
</td></tr></table> <!-- table holding results header + results table -->
</div><!-- main display area of selected tab -->
</div><!-- everything: hide until data is loaded -->
<!-- TODO(epoger): Can we get the base URLs (commondatastorage and
issues list) from
http://skia.googlecode.com/svn/buildbot/site_config/global_variables.json
? I tried importing the
http://skia.googlecode.com/svn/buildbot/skia_tools.js script and using
that to do so, but I got Access-Control-Allow-Origin errors.
-->
</body>
</html>
|