aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/graph_fuzzing.html
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-06-15 18:50:39 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-12-06 16:42:58 +0100
commit0230ba3e7ee638765ace8e2c3b436e703017b46c (patch)
tree92f454376c4cf12317ff858ff16826c28dfc748d /dashboard/app/graph_fuzzing.html
parent40ec852a0b6073c78a43148b36ba9ef67954e18b (diff)
dashboard/app: add page with manager stats graphs
Diffstat (limited to 'dashboard/app/graph_fuzzing.html')
-rw-r--r--dashboard/app/graph_fuzzing.html62
1 files changed, 62 insertions, 0 deletions
diff --git a/dashboard/app/graph_fuzzing.html b/dashboard/app/graph_fuzzing.html
new file mode 100644
index 000000000..ab18a2742
--- /dev/null
+++ b/dashboard/app/graph_fuzzing.html
@@ -0,0 +1,62 @@
+{{/*
+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.
+
+Manager statistics graphs.
+*/}}
+
+<!doctype html>
+<html>
+<head>
+ <title>{{.Header.Namespace}} fuzzing stats</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() {
+ var data = new google.visualization.DataTable();
+ data.addColumn({type: 'string'});
+ {{range $.Graph.Headers}}
+ data.addColumn({type: 'number', label: '{{.}}'});
+ data.addColumn({type: 'string', role: 'tooltip'});
+ {{- end}}
+ data.addRows([ {{range $.Graph.Columns}}
+ [ "{{.Hint}}", {{range .Vals}}
+ {{if .Val}}{{.Val}}{{end}}, '{{.Hint}}',
+ {{- end}}
+ ],
+ {{- end}}
+ ]);
+ new google.visualization.LineChart(document.getElementById('graph_div')).
+ draw(data, {
+ width: "80%",
+ height: 600,
+ interpolateNulls: true,
+ focusTarget: "category",
+ chartArea: {width: '95%', height: '100%'},
+ legend: {position: 'in'},
+ axisTitlesPosition: 'out',
+ hAxis: {textPosition: 'in', maxAlternation: 1},
+ vAxis: {textPosition: 'in'},
+ explorer: {axis: 'horizontal', maxZoomIn: 0, maxZoomOut: 1, zoomDelta: 1.2, keepInBounds: true}
+ })
+ }
+ </script>
+</head>
+<body>
+ {{template "header" .Header}}
+ <div class="page">
+ <div id="graph_div" class="main-content"></div>
+ <aside>
+ <form>
+ {{template "input-checkbox" .Managers}}
+ {{template "input-checkbox" .Metrics}}
+ {{template "input-slider" .Months}}
+ <input type="submit" value="Refresh"/>
+ </form>
+ </aside>
+ </div>
+</body>
+</html>