From 9db88265dbce82f690f9b166b24bba1570d15854 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 14 Feb 2023 12:53:40 +0100 Subject: dashboard: display subsystems on the bug page Currently the information is only displayed on the main page, which is not very convenient. --- dashboard/app/bug.html | 6 ++++++ dashboard/app/main.go | 7 +++++++ pkg/html/pages/style.css | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dashboard/app/bug.html b/dashboard/app/bug.html index e13aa3de8..467969106 100644 --- a/dashboard/app/bug.html +++ b/dashboard/app/bug.html @@ -16,6 +16,12 @@ Page with details about a single bug. {{.Bug.Title}}

Status: {{if .Bug.ExternalLink}}{{.Bug.Status}}{{else}}{{.Bug.Status}}{{end}}
+ {{if .Subsystems}} + Subsystems: {{range .Subsystems}} + {{link .Link .Name}} + {{- end}} +
+ {{- end}} Reported-by: {{.Bug.CreditEmail}}
{{if .Bug.Commits}} Fix commit: {{template "fix_commits" .Bug.Commits}}
diff --git a/dashboard/app/main.go b/dashboard/app/main.go index d95e79a62..203847851 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -190,6 +190,7 @@ type uiBugPage struct { Crashes *uiCrashTable FixBisections *uiCrashTable TestPatchJobs *uiJobList + Subsystems []*uiBugSubsystem } type uiBugGroup struct { @@ -559,6 +560,12 @@ func handleBug(c context.Context, w http.ResponseWriter, r *http.Request) error Jobs: testPatchJobs, }, } + for _, entry := range bug.Tags.Subsystems { + data.Subsystems = append(data.Subsystems, &uiBugSubsystem{ + Name: entry.Name, + Link: html.AmendURL("/"+bug.Namespace, "subsystem", entry.Name), + }) + } // bug.BisectFix is set to BisectNot in two cases : // - no fix bisections have been performed on the bug // - fix bisection was performed but resulted in a crash on HEAD diff --git a/pkg/html/pages/style.css b/pkg/html/pages/style.css index 71a3efe71..aecde7554 100644 --- a/pkg/html/pages/style.css +++ b/pkg/html/pages/style.css @@ -194,7 +194,7 @@ table td, table th { display: inline-block; } -.list_table .subsystem { +.subsystem { background: white; border: 1pt solid black; display: inline-block; @@ -204,7 +204,7 @@ table td, table th { font-size: small; } -.list_table .subsystem a { +.subsystem a { text-decoration: none; color: black; } -- cgit mrf-deployment