aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/templates/graph_bugs.html
blob: 03342614d3941766631d324856970f25ecd77e17 (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
{{/*
Copyright 2020 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.

Bugs statistics graph.
*/}}

<!doctype html>
<html>
<head>
	<title>{{.Header.Namespace}} health</title>
	{{template "head" .Header}}

	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
	<script type="text/javascript">
		google.load("visualization", "1", {packages:["corechart"]});
		google.setOnLoadCallback(drawCharts);
		function drawCharts() {
			new google.visualization.LineChart(document.getElementById('graph_div')).
				draw(google.visualization.arrayToDataTable([
					["-", {{range $.Graph.Headers}}"{{.Name}}", {{end}}],
					{{range $.Graph.Columns}}["{{.Hint}}", {{range .Vals}}{{.Val}},{{end}}],{{end}}
				]), {
					width: "100%",
					chartArea: {width: '95%', height: '95%'},
					legend: {position: 'in'},
					axisTitlesPosition: 'out',
					hAxis: {textPosition: 'in', maxAlternation: 1},
					vAxis: {textPosition: 'in'},
					focusTarget: "category",
					series: {
						0: {targetAxisIndex: 0, color: "red", lineWidth: 3},
						1: {targetAxisIndex: 1, color: "black"},
						2: {targetAxisIndex: 1, color: "green"},
					},
					vAxes: {
						0: {title: '# open bugs', gridlines: {multiple: 1}, minorGridlines: {multiple: 1}},
						1: {title: '# total reported / fixed', gridlines: {count: 0}}
					}
				})
		}
	</script>
</head>
<body>
	{{template "header" .Header}}
	<a href="https://github.com/google/syzkaller/blob/master/docs/syzbot.md#amend" title="help" target="_blank" class="graph_help">🛈</a>
	<div id="graph_div"></div>
</body>
</html>