forked from google/syzkaller
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplates.html
418 lines (406 loc) · 14.1 KB
/
templates.html
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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
{{/*
Copyright 2017 syzkaller project authors. All rights reserved.
Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
*/}}
{{/* Info icon with a link, invoked with an URL string */}}
{{define "info_link"}}
<a href="{{.}}" title="help" target="_blank" class="info_link">🛈</a>
{{end}}
{{/* Common page head part, invoked with *uiHeader */}}
{{define "head"}}
<link rel="stylesheet" href="/static/style.css"/>
<script src="/static/common.js"></script>
{{if .AnalyticsTrackingID}}
<script async src="https://www.googletagmanager.com/gtag/js?id={{.AnalyticsTrackingID}}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '{{.AnalyticsTrackingID}}');
</script>
{{end}}
{{end}}
{{/* Common page header, invoked with *uiHeader */}}
{{define "header"}}
<header id="topbar">
<table class="position_table">
<tr>
<td>
<h1><a href="/{{$.Namespace}}">syzbot</a></h1>
</td>
<td class="namespace_td">
<select class="namespace" onchange="window.location.href = '/' + this.value + '{{.Subpage}}';">
{{- range $ns := .Namespaces}}
<option value="{{$ns.Name}}" {{if eq $.Namespace $ns.Name}}selected="1"{{end}}>
{{- $ns.Caption -}}
</option>
{{- end -}}
</select>
</td>
<td class="search">
{{if .Admin}}
<a href="/admin">admin</a> |
{{end}}
{{if .LoginLink}}
<a href="{{.LoginLink}}">sign-in</a> |
{{end}}
<a href="https://groups.google.com/forum/#!forum/syzkaller" target="_blank">mailing list</a> |
<a href="https://github.com/google/syzkaller" target="_blank">source</a> |
<a href="https://github.com/google/syzkaller/blob/master/docs/syzbot.md" target="_blank">docs</a>
</td>
</tr>
</table>
{{if not (eq .URLPath "/admin")}}
<table class="position_table">
<tr>
<td class="navigation">
<a class="navigation_tab{{if eq .URLPath (printf "/%v" $.Namespace)}}_selected{{end}}" href='/{{$.Namespace}}'>
<span style="color:DeepPink;">🐞</span> Open [{{$.Cached.Open}}]</a>
<a class="navigation_tab{{if eq .URLPath (printf "/%v/fixed" $.Namespace)}}_selected{{end}}" href='/{{$.Namespace}}/fixed'>
<span style="color:ForestGreen;">🐞</span> Fixed [{{$.Cached.Fixed}}]</a>
<a class="navigation_tab{{if eq .URLPath (printf "/%v/invalid" $.Namespace)}}_selected{{end}}" href='/{{$.Namespace}}/invalid'>
<span style="color:RoyalBlue;">🐞</span> Invalid [{{$.Cached.Invalid}}]</a>
</td>
</tr>
</table>
{{end}}
</header>
<br>
{{end}}
{{/* List of bugs, invoked with *uiBugGroup */}}
{{define "bug_list"}}
{{if .}}
{{if .Bugs}}
<table class="list_table">
{{if $.Caption}}
{{if $.Fragment}}
<caption id="{{$.Fragment}}"><a class="plain" href="#{{$.Fragment}}">
{{else}}
<caption>
{{end}}
{{$.Caption}} ({{len $.Bugs}}):
{{if $.Fragment}}</a>{{end}}
</caption>
{{end}}
<thead>
<tr>
{{if $.ShowNamespace}}
<th><a onclick="return sortTable(this, 'Kernel', textSort)" href="#">Kernel</a></th>
{{end}}
<th><a onclick="return sortTable(this, 'Title', textSort)" href="#">Title</a></th>
<th><a onclick="return sortTable(this, 'Repro', reproSort)" href="#">Repro</a></th>
<th><a onclick="return sortTable(this, 'Bisected', textSort)" href="#">Bisected</a></th>
<th><a onclick="return sortTable(this, 'Count', numSort)" href="#">Count</a></th>
<th><a onclick="return sortTable(this, 'Last', timeSort)" href="#">Last</a></th>
<th><a onclick="return sortTable(this, 'Reported', timeSort)" href="#">Reported</a></th>
{{if $.ShowPatch}}
<th><a onclick="return sortTable(this, 'Closed', timeSort)" href="#">Closed</a></th>
<th><a onclick="return sortTable(this, 'Patch', textSort)" href="#">Patch</a></th>
{{end}}
{{if $.ShowPatched}}
<th><a onclick="return sortTable(this, 'Patched', patchedSort)" href="#">Patched</a></th>
{{end}}
{{if $.ShowStatus}}
<th><a onclick="return sortTable(this, 'Status', textSort)" href="#">Status</a></th>
{{end}}
</tr>
</thead>
<tbody>
{{range $b := .Bugs}}
<tr>
{{if $.ShowNamespace}}<td>{{$b.Namespace}}</td>{{end}}
<td class="title"><a href="{{$b.Link}}">{{$b.Title}}</a></td>
<td class="stat">{{formatReproLevel $b.ReproLevel}}</td>
<td class="stat">
{{if and $b.BisectCauseDone $b.BisectFixDone}}
cause+fix
{{else if $b.BisectCauseDone}}
cause
{{else if $b.BisectFixDone}}
fix
{{end}}
</td>
<td class="stat {{if $b.NumCrashesBad}}bad{{end}}">{{$b.NumCrashes}}</td>
<td class="stat">{{formatLateness $.Now $b.LastTime}}</td>
<td class="stat">
{{if $b.ExternalLink}}
<a href="{{$b.ExternalLink}}">{{formatLateness $.Now $b.ReportedTime}}</a>
{{else}}
{{formatLateness $.Now $b.ReportedTime}}
{{end}}
</td>
{{if $.ShowPatch}}
<td class="stat">{{formatLateness $.Now $b.ClosedTime}}</td>
<td class="commit_list">{{template "fix_commits" $b.Commits}}</td>
{{end}}
{{if $.ShowPatched}}
<td class="patched" {{if $b.Commits}}title="{{with $com := index $b.Commits 0}}{{$com.Title}}{{end}}"{{end}}>{{len $b.PatchedOn}}/{{$b.NumManagers}}</td>
{{end}}
{{if $.ShowStatus}}
<td class="status">
{{if $b.ExternalLink}}
<a href="{{$b.ExternalLink}}">{{$b.Status}}</a>
{{else}}
{{$b.Status}}
{{end}}
</td>
{{end}}
</tr>
{{end}}
</tbody>
</table>
{{end}}
{{end}}
{{end}}
{{/* List of managers, invoked with []*uiManager */}}
{{define "manager_list"}}
{{if .}}
<table class="list_table">
<caption id="managers"><a class="plain" href="managers">Instances:</a></caption>
<thead>
<tr>
<th>Name</th>
<th>Active</th>
<th>Uptime</th>
<th>Corpus</th>
<th>Coverage {{template "info_link" "https://github.com/google/syzkaller/blob/master/docs/coverage.md"}}</th>
<th>Crashes</th>
<th>Execs</th>
<th colspan="3">Kernel build</th>
<th colspan="3">syzkaller build</th>
</tr>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th>Commit</th>
<th>Freshness</th>
<th>Status</th>
<th>Commit</th>
<th>Freshness</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{{range $mgr := .}}
<tr>
<td>{{link $mgr.Link $mgr.Name}}</td>
<td class="stat {{if $mgr.LastActiveBad}}bad{{end}}">{{formatLateness $mgr.Now $mgr.LastActive}}</td>
<td class="stat">{{formatDuration $mgr.CurrentUpTime}}</td>
<td class="stat">{{formatStat $mgr.MaxCorpus}}</td>
<td class="stat">
{{if $mgr.CoverLink}}
<a href="{{$mgr.CoverLink}}" target="_blank">
{{end}}
{{formatStat $mgr.MaxCover}}
{{if $mgr.CoverLink}}
</a>
{{end}}
</td>
<td class="stat">{{formatStat $mgr.TotalCrashes}}</td>
{{if $mgr.TotalExecsBad}}
<td class="stat bad">broken</td>
{{else}}
<td class="stat">{{formatStat $mgr.TotalExecs}}</td>
{{end}}
{{with $build := $mgr.CurrentBuild}}
<td class="stat" title="[{{$build.KernelAlias}}] {{$build.KernelCommitTitle}}">{{link $build.KernelCommitLink (formatShortHash $build.KernelCommit)}}</td>
<td class="stat" title="{{formatTime $build.KernelCommitDate}}" {{if $mgr.FailedBuildBugLink}}class="bad"{{end}}>{{formatLateness $mgr.Now $build.KernelCommitDate}}</td>
<td class="stat">{{if $mgr.FailedBuildBugLink}}<a href="{{$mgr.FailedBuildBugLink}}" class="bad">failing</a>{{end}}</td>
<td class="stat">{{link $build.SyzkallerCommitLink (formatShortHash $build.SyzkallerCommit)}}</td>
<td class="stat" title="{{formatTime $build.SyzkallerCommitDate}}" {{if $mgr.FailedSyzBuildBugLink}}class="bad"{{end}}>{{formatLateness $mgr.Now $build.SyzkallerCommitDate}}</td>
<td class="stat">{{if $mgr.FailedSyzBuildBugLink}}<a href="{{$mgr.FailedSyzBuildBugLink}}" class="bad">failing</a>{{end}}</td>
{{else}}
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
{{end}}
</tr>
{{end}}
</tbody>
</table>
{{end}}
{{end}}
{{/* List of fixing commits, invoked with []*uiCommit */}}
{{define "fix_commits"}}
{{range $com := .}}
<span class="mono">
{{if $com.Hash}}
{{formatShortHash $com.Hash}}
{{end}}
{{link $com.Link $com.Title}}
</span>
{{end}}
{{end}}
{{/* Bisection result, invoked with *uiJob */}}
{{/* Show bisection results */}}
{{define "bisect_results"}}
{{if .}}
<br>
{{$causeJob := 1}}
{{$fixJob := 2}}
{{if .ErrorLink}}
{{if eq .Type $causeJob}}
<b>Cause bisection: failed</b>
{{else if eq .Type $fixJob}}
<b>Fix bisection: failed</b>
{{end}}
({{link .LogLink "bisect log"}})</b><br>
{{else if .Commit}}
{{if eq .Type $causeJob}}
<b>Cause bisection: introduced by</b>
{{else if eq .Type $fixJob}}
<b>Fix bisection: fixed by</b>
{{end}}
<b>({{link .LogLink "bisect log"}}):</b><br>
<br><span class="mono">
commit {{.Commit.Hash}}<br>
Author: {{.Commit.Author}}<br>
Date: {{formatKernelTime .Commit.Date}}<br>
<br>
{{.Commit.Title}}<br>
</span><br>
{{else if .Commits}}
{{if eq .Type $causeJob}}
<b>Cause bisection: the cause commit could be any of</b>
{{else if eq .Type $fixJob}}
<b>Fix bisection: the fix commit could be any of</b>
{{end}}
<b>({{link .LogLink "bisect log"}}):</b><br>
<br><span class="mono">
{{range $com := .Commits}}
{{formatTagHash $com.Hash}} {{$com.Title}}<br>
{{end}}
</span>
{{else}}
{{if eq .Type $causeJob}}
<b>Cause bisection: the bug happens on the oldest tested release</b>
{{else if eq .Type $fixJob}}
<b>Fix bisection: the bug occurs on the latest tested release</b>
{{end}}
<br>
{{end}}
{{if .CrashLogLink}}
Crash: {{link .CrashReportLink .CrashTitle}} ({{link .CrashLogLink "log"}})<br>
Repro: {{optlink .Crash.ReproCLink "C"}}
{{optlink .Crash.ReproSyzLink "syz"}}
{{optlink .Crash.KernelConfigLink ".config"}}<br>
{{end}}
{{if not .Reported}}[report pending]<br>{{end}}
{{end}}
{{end}}
{{/* List of fixing commits, invoked with *uiCrashTable */}}
{{/* Show crashes */}}
{{define "crash_list"}}
{{if .}}
<table class="list_table">
<caption>{{.Caption}}:</caption>
<thead>
<tr>
<th><a onclick="return sortTable(this, 'Manager', textSort)" href="#">Manager</a></th>
<th><a onclick="return sortTable(this, 'Time', textSort, true)" href="#">Time</a></th>
<th><a onclick="return sortTable(this, 'Kernel', textSort)" href="#">Kernel</a></th>
<th><a onclick="return sortTable(this, 'Commit', textSort)" href="#">Commit</a></th>
<th><a onclick="return sortTable(this, 'Syzkaller', textSort)" href="#">Syzkaller</a></th>
<th><a onclick="return sortTable(this, 'Config', textSort)" href="#">Config</a></th>
<th><a onclick="return sortTable(this, 'Log', textSort)" href="#">Log</a></th>
<th><a onclick="return sortTable(this, 'Report', reproSort)" href="#">Report</a></th>
<th><a onclick="return sortTable(this, 'Syz repro', reproSort)" href="#">Syz repro</a></th>
<th><a onclick="return sortTable(this, 'C repro', textSort)" href="#">C repro</a></th>
<th><a onclick="return sortTable(this, 'machine info', textSort)" href="#">VM info</a></th>
{{if .HasMaintainers}}
<th><a onclick="return sortTable(this, 'Maintainers', textSort)" href="#">Maintainers</a></th>
{{end}}
</tr>
</thead>
<tbody>
{{range $b := .Crashes}}
<tr>
<td class="manager">{{$b.Manager}}</td>
<td class="time">{{formatTime $b.Time}}</td>
<td class="kernel" title="{{$b.KernelAlias}}">{{$b.KernelAlias}}</td>
<td class="tag" title="{{$b.KernelCommit}}
{{formatTime $b.KernelCommitDate}}">{{link $b.KernelCommitLink (formatShortHash $b.KernelCommit)}}</td>
<td class="tag">{{link $b.SyzkallerCommitLink (formatShortHash $b.SyzkallerCommit)}}</td>
<td class="config">{{if $b.KernelConfigLink}}<a href="{{$b.KernelConfigLink}}">.config</a>{{end}}</td>
<td class="repro">{{if $b.LogLink}}<a href="{{$b.LogLink}}">log</a>{{end}}</td>
<td class="repro">{{if $b.ReportLink}}<a href="{{$b.ReportLink}}">report</a>{{end}}</td>
<td class="repro">{{if $b.ReproSyzLink}}<a href="{{$b.ReproSyzLink}}">syz</a>{{end}}</td>
<td class="repro">{{if $b.ReproCLink}}<a href="{{$b.ReproCLink}}">C</a>{{end}}</td>
<td class="repro">{{if $b.MachineInfoLink}}<a href="{{$b.MachineInfoLink}}">info</a>{{end}}</td>
{{if $.HasMaintainers}}
<td class="maintainers" title="{{$b.Maintainers}}">{{$b.Maintainers}}</td>
{{end}}
</tr>
{{end}}
</tbody>
</table>
{{end}}
{{end}}
{{/* List of jobs, invoked with *uiJobList */}}
{{define "job_list"}}
{{if $.Jobs}}
<table class="list_table">
<caption id="jobs"><a class="plain" href="#jobs">{{if $.PerBug}}Patch testing requests:{{else}}Recent jobs:{{end}}</a></caption>
<thead>
<tr>
{{if not $.PerBug}}<th>Bug</th>{{end}}
<th>Created</th>
<th>Duration</th>
<th>User</th>
<th>Patch</th>
<th>Repo</th>
{{if not $.PerBug}}<th>Manager</th>{{end}}
<th>Result</th>
</tr>
</thead>
<tbody>
{{range $job := $.Jobs}}
<tr>
{{if not $.PerBug}}<td class="title"><a href="{{$job.BugLink}}">{{$job.BugTitle}}</a></td>{{end}}
<td class="time">{{link $job.ExternalLink (formatTime $job.Created)}}</td>
<td class="time" title="started: {{formatTime $job.Started}}
finished: {{formatTime $job.Finished}}">
{{formatDuration $job.Duration}}{{if gt $job.Attempts 1}} ({{$job.Attempts}}){{end}}
</td>
<td>
{{if eq $job.Type 0}}
{{$job.User}}
{{else if eq $job.Type 1}}
bisect
{{else if eq $job.Type 2}}
bisect fix
{{end}}
</td>
<td>{{optlink $job.PatchLink "patch"}}</td>
<td class="kernel" title="{{$job.KernelAlias}}">{{$job.KernelAlias}}</td>
{{if not $.PerBug}}<td title="{{$job.Namespace}}/{{$job.Reporting}}">{{$job.Manager}}</td>{{end}}
<td class="result">
{{if $job.ErrorLink}}
{{link $job.ErrorLink "error"}}
{{else if $job.LogLink}}
{{link $job.LogLink "log"}}
({{if $job.Commit}}1{{else}}{{len $job.Commits}}{{end}})
{{else if $job.CrashTitle}}
{{optlink $job.CrashReportLink "report"}}
{{optlink $job.CrashLogLink "log"}}
{{else if formatTime $job.Finished}}
OK
{{else if formatTime $job.Started}}
running
{{else}}
pending
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}
{{end}}