github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/dashboard/app/graph_fuzzing.html (about)

     1  {{/*
     2  Copyright 2020 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}} fuzzing stats</title>
    12  	{{template "head" .Header}}
    13  
    14  	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    15  	<script type="text/javascript">
    16  		google.load("visualization", "1", {packages:["corechart"]});
    17  		google.setOnLoadCallback(drawCharts);
    18  		function drawCharts() {
    19  			var data = new google.visualization.DataTable();
    20  			data.addColumn({type: 'string'});
    21  			{{range $.Graph.Headers}}
    22  				data.addColumn({type: 'number', label: '{{.}}'});
    23  				data.addColumn({type: 'string', role: 'tooltip'});
    24  			{{- end}}
    25  			data.addRows([ {{range $.Graph.Columns}}
    26  					[ "{{.Hint}}", {{range .Vals}}
    27  						{{if .IsNull}}null{{else if .Val}}{{.Val}}{{end}}, '{{.Hint}}',
    28  					{{- end}}
    29  					],
    30  				{{- end}}
    31  			]);
    32  			new google.visualization.LineChart(document.getElementById('graph_div')).
    33  				draw(data, {
    34  					width: "80%",
    35  					height: 600,
    36  					interpolateNulls: true,
    37  					focusTarget: "category",
    38  					chartArea: {width: '95%', height: '100%'},
    39  					legend: {position: 'in'},
    40  					axisTitlesPosition: 'out',
    41  					hAxis: {textPosition: 'in', maxAlternation: 1},
    42  					vAxis: {textPosition: 'in'},
    43  					explorer: {axis: 'horizontal', maxZoomIn: 0, maxZoomOut: 1, zoomDelta: 1.2, keepInBounds: true}
    44  				})
    45  		}
    46  	</script>
    47  </head>
    48  <body>
    49  	{{template "header" .Header}}
    50  	<div  class="page">
    51  		<div id="graph_div" class="main-content"></div>
    52  		<aside>
    53  			<form>
    54  				{{template "input-checkbox" .Managers}}
    55  				{{template "input-checkbox" .Metrics}}
    56  				{{template "input-slider" .Months}}
    57  				<input type="submit" value="Refresh"/>
    58  			</form>
    59  		</aside>
    60  	</div>
    61  </body>
    62  </html>