{{end}} {{if $.Managers}} {{range $mgr := $.Managers}} {{if $mgr.CurrentBuild}} {{else}} {{end}} {{end}}
Managers:
Name Last Active Current Build Current Uptime Today: Fuzzing Time Corpus Coverage Crashes Execs Failed Build
{{$mgr.Namespace}}/{{$mgr.Name}} {{formatLateness $.Now $mgr.LastActive}}{{formatLateness $.Now $mgr.CurrentBuild.Time}}{{formatDuration $mgr.CurrentUpTime}} {{formatDuration $mgr.TotalFuzzingTime}} {{formatStat $mgr.MaxCorpus}} {{formatStat $mgr.MaxCover}} {{formatStat $mgr.TotalCrashes}} {{formatStat $mgr.TotalExecs}} {{if $mgr.FailedBuildBugLink}}bug{{end}}


{{end}} {{if $.Jobs}} {{range $job := $.Jobs}} {{if $job.ErrorLink}} {{else if $job.CrashTitle}} {{else if formatTime $job.Finished}} {{else if formatTime $job.Started}} {{else}} {{end}} {{end}}
Recent jobs:
Bug Created Started Finished User Patch Repo Manager Result
{{$job.BugTitle}} {{if $job.ExternalLink}}{{formatTime $job.Created}}{{else}}{{formatTime $job.Created}}{{end}} {{formatTime $job.Started}}{{if gt $job.Attempts 1}} ({{$job.Attempts}}){{end}} {{formatTime $job.Finished}} {{$job.User}} patch {{$job.KernelAlias}} {{$job.Manager}}error {{if $job.CrashReportLink}} report {{end}} {{if $job.CrashLogLink}} log {{end}} OKrunningpending


{{end}} {{range $ns := $.BugNamespaces}}

{{$ns.Caption}}

{{if $ns.FixedLink}} {{if $ns.CoverLink}} source coverage | {{end}} fixed bugs ({{$ns.FixedCount}}) {{end}} {{range $group := $ns.Groups}} {{template "bug_list" $group}} {{end}}
{{end}}
Html程序  |  128行  |  3.82 KB

{{/*
Copyright 2017 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.

Main page.
*/}}

<!doctype html>
<html>
<head>
	{{template "head" .Header}}
	<title>syzbot</title>
</head>
<body>
	{{template "header" .Header}}

	{{if .Log}}
	<b>Error log:</b><br>
	<textarea id="log_textarea" readonly rows="20" wrap=off>{{printf "%s" .Log}}</textarea>
	<script>
		var textarea = document.getElementById("log_textarea");
		textarea.scrollTop = textarea.scrollHeight;
	</script>
	<br><br>
	{{end}}

	{{if $.Managers}}
	<table class="list_table" id="managers">
		<caption>Managers:</caption>
		<tr>
			<th>Name</th>
			<th>Last Active</th>
			<th>Current Build</th>
			<th>Current Uptime</th>
			<th>Today: Fuzzing Time</th>
			<th>Corpus</th>
			<th>Coverage</th>
			<th>Crashes</th>
			<th>Execs</th>
			<th>Failed Build</th>
		</tr>
		{{range $mgr := $.Managers}}
			<tr>
				<td><a href="{{$mgr.Link}}">{{$mgr.Namespace}}/{{$mgr.Name}}</a></td>
				<td class="stat {{if $mgr.LastActiveBad}}bad{{end}}">{{formatLateness $.Now $mgr.LastActive}}</td>
				{{if $mgr.CurrentBuild}}
					<td class="stat" title="{{$mgr.CurrentBuild.KernelAlias}}/{{$mgr.CurrentBuild.KernelCommit}} (syzkaller {{$mgr.CurrentBuild.SyzkallerCommit}})">{{formatLateness $.Now $mgr.CurrentBuild.Time}}</td>
				{{else}}
					<td></td>
				{{end}}
				<td class="stat">{{formatDuration $mgr.CurrentUpTime}}</td>
				<td class="stat">{{formatDuration $mgr.TotalFuzzingTime}}</td>
				<td class="stat">{{formatStat $mgr.MaxCorpus}}</td>
				<td class="stat">{{formatStat $mgr.MaxCover}}</td>
				<td class="stat">{{formatStat $mgr.TotalCrashes}}</td>
				<td class="stat">{{formatStat $mgr.TotalExecs}}</td>
				<td class="stat">{{if $mgr.FailedBuildBugLink}}<a href="{{$mgr.FailedBuildBugLink}}" class="bad">bug</a>{{end}}</td>
			</tr>
		{{end}}
	</table>
	<br><br>
	{{end}}

	{{if $.Jobs}}
	<table class="list_table" id="jobs">
		<caption>Recent jobs:</caption>
		<tr>
			<th>Bug</th>
			<th>Created</th>
			<th>Started</th>
			<th>Finished</th>
			<th>User</th>
			<th>Patch</th>
			<th>Repo</th>
			<th>Manager</th>
			<th>Result</th>
		</tr>
		{{range $job := $.Jobs}}
			<tr>
				<td class="title"><a href="{{$job.BugLink}}">{{$job.BugTitle}}</a></td>
				<td class="time">{{if $job.ExternalLink}}<a href="{{$job.ExternalLink}}">{{formatTime $job.Created}}</a>{{else}}{{formatTime $job.Created}}{{end}}</td>
				<td class="time">{{formatTime $job.Started}}{{if gt $job.Attempts 1}} ({{$job.Attempts}}){{end}}</td>
				<td class="time">{{formatTime $job.Finished}}</td>
				<td>{{$job.User}}</td>
				<td><a href="{{$job.PatchLink}}">patch</a></td>
				<td class="kernel" title="{{$job.KernelAlias}}">{{$job.KernelAlias}}</td>
				<td title="{{$job.Namespace}}/{{$job.Reporting}}">{{$job.Manager}}</td>
				{{if $job.ErrorLink}}
					<td class="result"><a href="{{$job.ErrorLink}}">error</a></td>
				{{else if $job.CrashTitle}}
					<td class="result" title="{{$job.CrashTitle}}">
						{{if $job.CrashReportLink}}
							<a href="{{$job.CrashReportLink}}">report</a>
						{{end}}
						{{if $job.CrashLogLink}}
							 <a href="{{$job.CrashLogLink}}">log</a>
						{{end}}
					</td>
				{{else if formatTime $job.Finished}}
					<td class="result">OK</td>
				{{else if formatTime $job.Started}}
					<td class="result">running</td>
				{{else}}
					<td class="result">pending</td>
				{{end}}
			</tr>
		{{end}}
	</table>
	<br><br>
	{{end}}

	{{range $ns := $.BugNamespaces}}
		<br>
		<h2 id="{{$ns.Name}}">{{$ns.Caption}}</h2>
		{{if $ns.FixedLink}}
			{{if $ns.CoverLink}}
				<a href="{{$ns.CoverLink}}" target="_blank">source coverage</a> |
			{{end}}
			<a href="{{$ns.FixedLink}}">fixed bugs ({{$ns.FixedCount}})</a>
		{{end}}
		{{range $group := $ns.Groups}}
			{{template "bug_list" $group}}
		{{end}}
		<br>
	{{end}}
</body>
</html>