aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-02-14 12:53:40 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2023-02-14 14:29:32 +0100
commit9db88265dbce82f690f9b166b24bba1570d15854 (patch)
tree8e940f34169d37ff4c6f1fb1bde5fb40255521ea
parent1d6b4af7597cff7f7150972538292e7f23189de7 (diff)
dashboard: display subsystems on the bug page
Currently the information is only displayed on the main page, which is not very convenient.
-rw-r--r--dashboard/app/bug.html6
-rw-r--r--dashboard/app/main.go7
-rw-r--r--pkg/html/pages/style.css4
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.
<b>{{.Bug.Title}}</b><br><br>
Status: {{if .Bug.ExternalLink}}<a href="{{.Bug.ExternalLink}}">{{.Bug.Status}}</a>{{else}}{{.Bug.Status}}{{end}}<br>
+ {{if .Subsystems}}
+ Subsystems: {{range .Subsystems}}
+ <span class="subsystem">{{link .Link .Name}}</span>
+ {{- end}}
+ <br>
+ {{- end}}
Reported-by: {{.Bug.CreditEmail}}<br>
{{if .Bug.Commits}}
<b>Fix commit:</b> {{template "fix_commits" .Bug.Commits}}<br>
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;
}