aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/html
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-01-26 11:36:00 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2023-01-27 17:31:25 +0100
commit6b1283d2ce0e5c36029f8e2fb8eeb3c6b7c29209 (patch)
tree94c669cff01ff5d4952fd2fd0815009c55229367 /pkg/html
parent9da06344c240d3cd7ce53ee0261722ee2198654a (diff)
dashboard: display subsystems in bug lists
To generate filtering URLs, use the ability of context.Context to carry on variable values.
Diffstat (limited to 'pkg/html')
-rw-r--r--pkg/html/html.go15
-rw-r--r--pkg/html/pages/style.css15
2 files changed, 30 insertions, 0 deletions
diff --git a/pkg/html/html.go b/pkg/html/html.go
index 8dc075bb6..c89c42fbb 100644
--- a/pkg/html/html.go
+++ b/pkg/html/html.go
@@ -6,6 +6,7 @@ package html
import (
"fmt"
"html/template"
+ "net/url"
"reflect"
"strings"
texttemplate "text/template"
@@ -191,3 +192,17 @@ func dereferencePointer(v interface{}) interface{} {
func commitLink(repo, commit string) string {
return vcs.CommitLink(repo, commit)
}
+
+func AmendURL(baseURL, key, value string) string {
+ if baseURL == "" {
+ return ""
+ }
+ parsed, err := url.Parse(baseURL)
+ if err != nil {
+ return ""
+ }
+ values := parsed.Query()
+ values.Set(key, value)
+ parsed.RawQuery = values.Encode()
+ return parsed.String()
+}
diff --git a/pkg/html/pages/style.css b/pkg/html/pages/style.css
index d5ceef253..71a3efe71 100644
--- a/pkg/html/pages/style.css
+++ b/pkg/html/pages/style.css
@@ -194,6 +194,21 @@ table td, table th {
display: inline-block;
}
+.list_table .subsystem {
+ background: white;
+ border: 1pt solid black;
+ display: inline-block;
+ padding-left: 2pt;
+ padding-right: 2pt;
+ margin-left: 4pt;
+ font-size: small;
+}
+
+.list_table .subsystem a {
+ text-decoration: none;
+ color: black;
+}
+
.bad {
color: #f00;
font-weight: bold;