github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/dashboard/app/graph_lifetimes.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  Bug lifetimes graph.
     6  */}}
     7  
     8  <!doctype html>
     9  <html>
    10  <head>
    11  	<title>{{.Header.Namespace}} bug lifetimes</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('datetime', '-');
    21  			data.addColumn('number', 'fixed');
    22  			data.addColumn('number', 'fixed (>year)');
    23  			data.addColumn('number', 'not fixed');
    24  			data.addColumn('number', 'introduced');
    25  			data.addColumn('number', 'introduced (>year)');
    26  			data.addRows([
    27  				{{range $.Lifetimes}}
    28  					[new Date("{{formatJSTime .Reported}}"),
    29  						{{- if .Fixed}}{{.Fixed}}{{else}}null{{end}},
    30  						{{- if .Fixed1y}}{{.Fixed1y}}{{else}}null{{end}},
    31  						{{- if .NotFixed}}{{.NotFixed}}{{else}}null{{end}},
    32  						{{- if .Introduced}}{{.Introduced}}{{else}}null{{end}},
    33  						{{- if .Introduced1y}}{{.Introduced1y}}{{else}}null{{end}}],
    34  				{{- end}}
    35  			]);
    36  			new google.visualization.ScatterChart(document.getElementById('graph_div')).
    37  				draw(data, {
    38  					width: "100%",
    39  					pointSize: 2,
    40  					chartArea: {width: '90%', height: '85%'},
    41  					legend: {position: 'top'},
    42  					axisTitlesPosition: 'out',
    43  					hAxis: {out: 'textPosition', title: 'bug reported on'},
    44  					vAxis: {textPosition: 'out', title: '# days'},
    45  					explorer: {
    46  						axis: 'horizontal',
    47  						actions: ['dragToZoom', 'rightClickToReset'],
    48  						keepInBounds: true,
    49  						maxZoomIn: 0.1,
    50  					},
    51  					series: [
    52  						{color: "#26ba1c"},
    53  						{color: "#15870e"},
    54  						{color: "#ff0000"},
    55  						{color: "#f060c7"},
    56  						{color: "#ff0000"},
    57  					],
    58  				})
    59  		}
    60  	</script>
    61  </head>
    62  <body>
    63  	{{template "header" .Header}}
    64  	<div id="graph_div"></div>
    65  </body>
    66  </html>