From 9d46048cb9b227d292b8587cdfe883ea8576e7f4 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 12 Dec 2017 14:55:43 +0100 Subject: dashboard/app: allow fragment links to namespaces Now "#foo" link will point to namespace "foo". --- dashboard/app/main.go | 8 +++++--- dashboard/app/main.html | 4 ++-- dashboard/app/templates.html | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dashboard/app/main.go b/dashboard/app/main.go index 439c9d7fc..99915f1fa 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -73,6 +73,7 @@ type uiBugPage struct { type uiBugGroup struct { Now time.Time Caption string + Namespace string ShowNamespace bool Bugs []*uiBug } @@ -273,9 +274,10 @@ func fetchBugs(c context.Context) ([]*uiBugGroup, error) { for ns, bugs := range groups { sort.Sort(uiBugSorter(bugs)) res = append(res, &uiBugGroup{ - Now: now, - Caption: fmt.Sprintf("%v (%v)", ns, len(bugs)), - Bugs: bugs, + Now: now, + Caption: fmt.Sprintf("%v (%v)", ns, len(bugs)), + Namespace: ns, + Bugs: bugs, }) } sort.Sort(uiBugGroupSorter(res)) diff --git a/dashboard/app/main.html b/dashboard/app/main.html index ba7d094cf..5007ec533 100644 --- a/dashboard/app/main.html +++ b/dashboard/app/main.html @@ -22,7 +22,7 @@ Main page.

- +
@@ -57,7 +57,7 @@ Main page.
Managers:
Name


- +
diff --git a/dashboard/app/templates.html b/dashboard/app/templates.html index 510d9e49b..b026a9970 100644 --- a/dashboard/app/templates.html +++ b/dashboard/app/templates.html @@ -7,7 +7,7 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the {{define "bug_list"}} {{if .}} {{if .Bugs}} -
Recent jobs:
Created
+
{{if $.ShowNamespace}}{{end}} -- cgit mrf-deployment
{{$.Caption}}:
Kernel