github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/dashboard/app/graph_crashes.html (about) 1 {{/* 2 Copyright 2022 syzkaller project authors. All rights reserved. 3 Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 4 5 Manager statistics graphs. 6 */}} 7 8 <!doctype html> 9 <html> 10 <head> 11 <title>{{.Header.Namespace}} crash stats</title> 12 {{template "head" .Header}} 13 14 <script type="text/javascript" src="https://www.google.com/jsapi"></script> 15 {{if .Graph}} 16 <script type="text/javascript"> 17 google.load("visualization", "1", {packages:["corechart"]}); 18 google.setOnLoadCallback(drawCharts); 19 function drawCharts() { 20 var data = new google.visualization.DataTable(); 21 data.addColumn({type: 'string'}); 22 {{range $.Graph.Headers}} 23 data.addColumn({type: 'number', label: '{{.}}'}); 24 data.addColumn({type: 'string', role: 'tooltip'}); 25 {{- end}} 26 data.addRows([ {{range $.Graph.Columns}} 27 [ "{{.Hint}}", {{range .Vals}} 28 {{if .Val}}{{.Val}}{{end}}, '{{.Hint}}', 29 {{- end}} 30 ], 31 {{- end}} 32 ]); 33 new google.visualization.LineChart(document.getElementById('graph_div')). 34 draw(data, { 35 width: "80%", 36 height: 600, 37 interpolateNulls: true, 38 focusTarget: "category", 39 chartArea: {width: '95%', height: '100%'}, 40 legend: {position: 'in'}, 41 axisTitlesPosition: 'out', 42 hAxis: {textPosition: 'in', maxAlternation: 1}, 43 vAxis: {textPosition: 'in', viewWindowMode: 'maximized'}, 44 explorer: {axis: 'horizontal', maxZoomIn: 0, maxZoomOut: 1, zoomDelta: 1.2, keepInBounds: true} 45 }) 46 } 47 </script> 48 {{end}} 49 </head> 50 <body> 51 {{template "header" .Header}} 52 <div class="page"> 53 {{if .Graph}} 54 <div id="graph_div" class="main-content"></div> 55 {{else if .Table}} 56 {{with .Table}} 57 <div class="main-content"> 58 <table class="list_table"> 59 <caption>{{.Title}}</caption> 60 <thead> 61 <tr> 62 <th>Title</th> 63 <th>Count</th> 64 <th>Share</th> 65 <th>Graph</th> 66 </tr> 67 </thead> 68 <tbody> 69 {{range .Rows}} 70 <tr> 71 <td class="title"><a href="{{.Link}}">{{.Title}}</a></td> 72 <td>{{.Count}}</td> 73 <td>{{.Share | printf "%.1f"}}%</td> 74 <td><a href="{{.GraphLink}}">[last month]</a></td> 75 </tr> 76 {{end}} 77 </tbody> 78 </table> 79 </div> 80 {{end}} 81 {{end}} 82 <aside> 83 <form> 84 {{template "input-multi-text" .Regexps}} 85 {{template "input-slider" .GraphMonths}} 86 <input type="submit" name="show-graph" value="Show graph"/> <br /> 87 </form> 88 <form> 89 {{template "input-slider" .TableDays}} 90 <input type="submit" name="show-crashers" value="Top crashers"/> 91 </form> 92 </aside> 93 </div> 94 </body> 95 </html>