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.
This commit is contained in:
Dmitry Vyukov 2018-04-11 19:22:06 +02:00
parent 9cd56d71a8
commit 96f3f2ea79
2 changed files with 6 additions and 3 deletions

View File

@ -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,

View File

@ -111,7 +111,7 @@ Main page.
{{range $ns := $.BugNamespaces}}
<br>
<h2 id="{{$ns.Caption}}">{{$ns.Caption}}</h2>
<h2 id="{{$ns.Name}}">{{$ns.Caption}}</h2>
{{if $ns.FixedLink}}
{{if $ns.CoverLink}}
<a href="{{$ns.CoverLink}}" target="_blank">source coverage</a> |