From eeefb53ba92e50f35ac78e734d1f1787d9ce7462 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 1 Feb 2018 16:20:13 +0100 Subject: dashboard/app: tidy up UIs Show short kernel repo/branch aliases, also slightly reshuffle and tidy up tables. --- dashboard/app/bug.html | 2 +- dashboard/app/common.html | 17 ---------------- dashboard/app/entities.go | 6 +++++- dashboard/app/main.go | 12 ++++-------- dashboard/app/main.html | 44 +++++++++++++++++++----------------------- dashboard/app/static/style.css | 13 +++++++++---- dashboard/app/templates.html | 19 ++++++++++++++++++ 7 files changed, 58 insertions(+), 55 deletions(-) delete mode 100644 dashboard/app/common.html diff --git a/dashboard/app/bug.html b/dashboard/app/bug.html index 1836a2bc0..98ca6aff3 100644 --- a/dashboard/app/bug.html +++ b/dashboard/app/bug.html @@ -46,7 +46,7 @@ Page with details about a single bug. {{$c.Manager}} {{formatTime $c.Time}} - {{$c.KernelRepo}}/{{$c.KernelBranch}} + {{$c.KernelAlias}} {{$c.KernelCommit}} {{$c.SyzkallerCommit}} .config diff --git a/dashboard/app/common.html b/dashboard/app/common.html deleted file mode 100644 index 74785b105..000000000 --- a/dashboard/app/common.html +++ /dev/null @@ -1,17 +0,0 @@ -{{define "header"}} -
- - - - - -
-

syzkaller

-
-
-
-{{end}} diff --git a/dashboard/app/entities.go b/dashboard/app/entities.go index 8036eb5e4..a444235df 100644 --- a/dashboard/app/entities.go +++ b/dashboard/app/entities.go @@ -339,7 +339,11 @@ func bugReportingHash(bugHash, reporting string) string { } func kernelRepoInfo(build *Build) KernelRepo { - repoID := build.KernelRepo + "/" + build.KernelBranch + return kernelRepoInfoRaw(build.KernelRepo, build.KernelBranch) +} + +func kernelRepoInfoRaw(repo, branch string) KernelRepo { + repoID := repo + "/" + branch info := config.KernelRepos[repoID] if info.Alias == "" { info.Alias = repoID diff --git a/dashboard/app/main.go b/dashboard/app/main.go index e7cef081b..383ea0cc2 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -54,8 +54,7 @@ type uiManager struct { type uiBuild struct { Time time.Time SyzkallerCommit string - KernelRepo string - KernelBranch string + KernelAlias string KernelCommit string KernelConfigLink string } @@ -117,8 +116,7 @@ type uiJob struct { Manager string BugTitle string BugID string - KernelRepo string - KernelBranch string + KernelAlias string KernelCommit string PatchLink string Attempts int @@ -452,8 +450,7 @@ func makeUIBuild(build *Build) *uiBuild { return &uiBuild{ Time: build.Time, SyzkallerCommit: build.SyzkallerCommit, - KernelRepo: build.KernelRepo, - KernelBranch: build.KernelBranch, + KernelAlias: kernelRepoInfo(build).Alias, KernelCommit: build.KernelCommit, KernelConfigLink: textLink("KernelConfig", build.KernelConfig), } @@ -541,8 +538,7 @@ func loadRecentJobs(c context.Context) ([]*uiJob, error) { Namespace: job.Namespace, Manager: job.Manager, BugTitle: job.BugTitle, - KernelRepo: job.KernelRepo, - KernelBranch: job.KernelBranch, + KernelAlias: kernelRepoInfoRaw(job.KernelRepo, job.KernelBranch).Alias, PatchLink: textLink("Patch", job.Patch), Attempts: job.Attempts, Started: job.Started, diff --git a/dashboard/app/main.html b/dashboard/app/main.html index 5007ec533..7be70c538 100644 --- a/dashboard/app/main.html +++ b/dashboard/app/main.html @@ -41,7 +41,7 @@ Main page. {{$mgr.Namespace}}/{{$mgr.Name}} {{formatLateness $.Now $mgr.LastActive}} {{if $mgr.CurrentBuild}} - {{formatLateness $.Now $mgr.CurrentBuild.Time}} + {{formatLateness $.Now $mgr.CurrentBuild.Time}} {{else}} {{end}} @@ -60,48 +60,44 @@ Main page. + - - - + {{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 UserBug PatchReportingManager RepoManager 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}}{{$job.BugTitle}} patch{{$job.Namespace}}/{{$job.Reporting}}{{$job.Manager}}{{$job.KernelRepo}}/{{$job.KernelBranch}} - {{if $job.ErrorLink}} - error - {{else if $job.CrashTitle}} + {{$job.KernelAlias}}{{$job.Manager}}error {{if $job.CrashReportLink}} - {{$job.CrashTitle}} - {{else}} - {{$job.CrashTitle}} + report {{end}} {{if $job.CrashLogLink}} - (log) + log {{end}} - {{else if formatTime $job.Finished}} - OK - {{else if formatTime $job.Started}} - running - {{else}} - pending - {{end}} - OKrunningpending
diff --git a/dashboard/app/static/style.css b/dashboard/app/static/style.css index 5ef180b99..5f0402b27 100644 --- a/dashboard/app/static/style.css +++ b/dashboard/app/static/style.css @@ -99,13 +99,18 @@ table td, table th { } .list_table .kernel { - width: 200pt; - max-width: 200pt; + width: 60pt; + max-width: 60pt; } .list_table .maintainers { - width: 300pt; - max-width: 300pt; + width: 150pt; + max-width: 150pt; +} + +.list_table .result { + width: 60pt; + max-width: 60pt; } .list_table .stat { diff --git a/dashboard/app/templates.html b/dashboard/app/templates.html index 90c0c1555..788a1ce69 100644 --- a/dashboard/app/templates.html +++ b/dashboard/app/templates.html @@ -3,6 +3,25 @@ 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. */}} +{{/* Common page header, invoked with *uiHeader */}} +{{define "header"}} +
+ + + + + +
+

syzkaller

+
+
+
+{{end}} + {{/* List of bugs, invoked with *uiBugGroup */}} {{define "bug_list"}} {{if .}} -- cgit mrf-deployment