From 96f3f2ea79fcb1293039e051bcd67c88b26175b9 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 11 Apr 2018 19:22:06 +0200 Subject: dashboard/app: fix anchors for namespaces The human readable caption is a bad value for anchor, also potentially changing over time. Restore the namespace name as anchor as it should be. --- dashboard/app/main.go | 7 +++++-- dashboard/app/main.html | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dashboard/app/main.go b/dashboard/app/main.go index b612635ac..0f679ecf5 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -77,6 +77,7 @@ type uiBugPage struct { } type uiBugNamespace struct { + Name string Caption string CoverLink string FixedLink string @@ -422,9 +423,11 @@ func fetchNamespaceBugs(c context.Context, accessLevel AccessLevel, ns string, if !onlyFixed { fixedLink = fmt.Sprintf("?fixed=%v", ns) } + cfg := config.Namespaces[ns] uiNamespace := &uiBugNamespace{ - Caption: config.Namespaces[ns].DisplayTitle, - CoverLink: config.Namespaces[ns].CoverLink, + Name: ns, + Caption: cfg.DisplayTitle, + CoverLink: cfg.CoverLink, FixedCount: fixedCount, FixedLink: fixedLink, Groups: uiGroups, diff --git a/dashboard/app/main.html b/dashboard/app/main.html index d3f1b2638..d522444eb 100644 --- a/dashboard/app/main.html +++ b/dashboard/app/main.html @@ -111,7 +111,7 @@ Main page. {{range $ns := $.BugNamespaces}}
-

{{$ns.Caption}}

+

{{$ns.Caption}}

{{if $ns.FixedLink}} {{if $ns.CoverLink}} source coverage | -- cgit mrf-deployment