From 9e421cc9c50e1529ea5b3b036296df7eee9e32d9 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 15 Feb 2018 15:02:14 +0100 Subject: dashboard/app: allow showing source coverage report --- dashboard/app/config.go | 3 +++ dashboard/app/main.go | 2 ++ dashboard/app/main.html | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dashboard/app/config.go b/dashboard/app/config.go index aab5492e2..135b4a592 100644 --- a/dashboard/app/config.go +++ b/dashboard/app/config.go @@ -40,6 +40,9 @@ type Config struct { AccessLevel AccessLevel // Name used in UI. DisplayTitle string + // URL of a source coverage report for this namespace + // (uploading/updating the report is out of scope of the system for now). + CoverLink string // Per-namespace clients that act only on a particular namespace. Clients map[string]string // A unique key for hashing, can be anything. diff --git a/dashboard/app/main.go b/dashboard/app/main.go index ae30970c5..0f29e44a0 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -71,6 +71,7 @@ type uiBugPage struct { type uiBugNamespace struct { Caption string + CoverLink string FixedLink string FixedCount int Groups []*uiBugGroup @@ -363,6 +364,7 @@ func fetchBugs(c context.Context, r *http.Request, onlyFixed string) ([]*uiBugNa } res = append(res, &uiBugNamespace{ Caption: config.Namespaces[ns].DisplayTitle, + CoverLink: config.Namespaces[ns].CoverLink, FixedCount: fixedCount, FixedLink: fixedLink, Groups: uiGroups, diff --git a/dashboard/app/main.html b/dashboard/app/main.html index b25cc5cd1..115b39c5c 100644 --- a/dashboard/app/main.html +++ b/dashboard/app/main.html @@ -113,7 +113,10 @@ Main page. {{range $ns := $.BugNamespaces}}

{{$ns.Caption}}

- {{if $ns.FixedCount}} + {{if $ns.FixedLink}} + {{if $ns.CoverLink}} + source coverage | + {{end}} fixed bugs ({{$ns.FixedCount}}) {{end}} {{range $group := $ns.Groups}} -- cgit mrf-deployment