aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/manager/html/main.html
blob: 1b4ea0f755a439a0ca1a3c98adb59fd0dd42e373 (plain)
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
{{/*
Copyright 2024 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.
*/}}

<table class="list_table">
	{{range $s := $.Stats}}
	<tr>
		<td class="stat_name" title="{{$s.Hint}}">{{$s.Name}}</td>
		<td class="stat_value">
			{{if $s.Link}}
				<a href="{{$s.Link}}">{{$s.Value}}</a>
			{{else}}
				{{$s.Value}}
			{{end}}
		</td>
	</tr>
	{{end}}
</table>

{{if .Crashes}}
<table class="list_table">
	<caption>Crashes:</caption>
	<tr>
		<th><a onclick="return sortTable(this, 'Description', textSort)" href="#">Description</a></th>
		<th><a onclick="return sortTable(this, 'Count', numSort)" href="#">Count</a></th>
		<th><a onclick="return sortTable(this, 'Last Time', textSort, true)" href="#">Last Time</a></th>
		<th><a onclick="return sortTable(this, 'Report', textSort)" href="#">Report</a></th>
	</tr>
	{{range $c := $.Crashes}}
	<tr>
		<td class="title"><a href="/crash?id={{$c.ID}}">{{$c.Description}}</a></td>
		<td class="stat {{if not $c.Active}}inactive{{end}}">{{$c.Count}}</td>
		<td class="time {{if not $c.Active}}inactive{{end}}">{{formatTime $c.LastTime}}</td>
		<td>
			{{if $c.Triaged}}
				<a href="/report?id={{$c.ID}}">{{$c.Triaged}}</a>
			{{end}}
			{{if $c.Strace}}
				<a href="/file?name={{$c.Strace}}">Strace</a>
			{{end}}
		</td>
	</tr>
	{{end}}
</table>
{{end}}

{{define "diff_crashes"}}
<table class="list_table">
	<caption>{{.Title}}:</caption>
	<tr>
		<th>Description</th>
		<th>Base</th>
		<th>Patched</th>
	</tr>
	{{range $bug := .List}}
	<tr>
		<td class="title">{{$bug.Title}}</td>
		<td class="title">
		{{if gt $bug.Base.Crashes 0}}
			{{$bug.Base.Crashes}} crashes
		{{else if $bug.Base.NotCrashed}}
			Not affected
		{{else}} ? {{end}}
		{{if $bug.Base.Report}}
			<a href="/file?name={{$bug.Base.Report}}">[report]</a>
		{{end}}
		</td>
		<td class="title">
		{{if gt $bug.Patched.Crashes 0}}
			{{$bug.Patched.Crashes}} crashes
		{{else}} ? {{end}}
		{{if $bug.Patched.Report}}
			<a href="/file?name={{$bug.Patched.Report}}">[report]</a>
		{{end}}
		{{if $bug.Patched.CrashLog}}
			<a href="/file?name={{$bug.Patched.CrashLog}}">[crash log]</a>
		{{end}}
		{{if $bug.Patched.Repro}}
			<a href="/file?name={{$bug.Patched.Repro}}">[syz repro]</a>
		{{end}}
		{{if $bug.Patched.ReproLog}}
			<a href="/file?name={{$bug.Patched.ReproLog}}">[repro log]</a>
		{{end}}
		{{if $bug.Reproducing}}[reproducing]{{end}}
		</td>
	</tr>
	{{end}}
</table>
{{end}}

{{if .PatchedOnly}}
{{template "diff_crashes" .PatchedOnly}}
{{end}}

{{if .AffectsBoth}}
{{template "diff_crashes" .AffectsBoth}}
{{end}}

{{if .InProgress}}
{{template "diff_crashes" .InProgress}}
{{end}}

<b>Log:</b>
<br>
<textarea id="log_textarea" readonly rows="20" wrap=off>
{{.Log}}
</textarea>
<script>
	var textarea = document.getElementById("log_textarea");
	textarea.scrollTop = textarea.scrollHeight;
</script>