From 9cf4d4ed2e6b3f689e760845ee2780beaaeff087 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 7 Nov 2019 12:37:52 +0100 Subject: dashboard/app: few more cosmetic UI changes Don't add
before bisection, if bisection does not exist. Rename fix bisections table to make it clearer that they failed. --- dashboard/app/bug.html | 4 ++-- dashboard/app/jobs_test.go | 2 +- dashboard/app/main.go | 2 +- dashboard/app/templates.html | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dashboard/app/bug.html b/dashboard/app/bug.html index 082238ea9..e09ed7e98 100644 --- a/dashboard/app/bug.html +++ b/dashboard/app/bug.html @@ -23,9 +23,9 @@ Page with details about a single bug. Patched on: {{.Bug.PatchedOn}}, missing on: {{.Bug.MissingOn}}
{{end}} {{end}} - First crash: {{formatLateness $.Now $.Bug.FirstTime}}, last: {{formatLateness $.Now $.Bug.LastTime}}

+ First crash: {{formatLateness $.Now $.Bug.FirstTime}}, last: {{formatLateness $.Now $.Bug.LastTime}}
- {{template "bisect_results" .BisectCause}}
+ {{template "bisect_results" .BisectCause}} {{template "bisect_results" .BisectFix}} {{template "bug_list" .DupOf}} diff --git a/dashboard/app/jobs_test.go b/dashboard/app/jobs_test.go index b845c948b..20a10e243 100644 --- a/dashboard/app/jobs_test.go +++ b/dashboard/app/jobs_test.go @@ -617,7 +617,7 @@ func TestFixBisectionsListed(t *testing.T) { // Check the bug page and ensure that a bisection is listed out. content, err = c.httpRequest("GET", url, "", AccessAdmin) c.expectEQ(err, nil) - c.expectTrue(bytes.Contains(content, []byte("Fix bisections (1)"))) + c.expectTrue(bytes.Contains(content, []byte("Fix bisection attempts"))) // Advance time by 30 days. No notification emails. { diff --git a/dashboard/app/main.go b/dashboard/app/main.go index 42566a400..f1c57cecd 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -408,7 +408,7 @@ func handleBug(c context.Context, w http.ResponseWriter, r *http.Request) error if len(fixBisections) != 0 { data.FixBisections = &uiCrashTable{ Crashes: fixBisections, - Caption: fmt.Sprintf("Fix bisections (%v)", len(fixBisections)), + Caption: "Fix bisection attempts", } } } diff --git a/dashboard/app/templates.html b/dashboard/app/templates.html index 80f27e7c2..3f64ab2af 100644 --- a/dashboard/app/templates.html +++ b/dashboard/app/templates.html @@ -236,6 +236,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{/* Show bisection results */}} {{define "bisect_results"}} {{if .}} +
{{$causeJob := 1}} {{$fixJob := 2}} {{if .ErrorLink}} -- cgit mrf-deployment