From 353d19019153d6e7ee4e98b18d790b2523901c58 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 30 Jun 2020 16:42:04 +0200 Subject: dashboard/app: add navigation buttons Currently we have only "fixed" link at the top of the page. "invalid" is missing and this is not scalable. Add natigation buttons (tabs) for main pages. --- dashboard/app/handler.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dashboard/app/handler.go') diff --git a/dashboard/app/handler.go b/dashboard/app/handler.go index 561547793..ed55831d8 100644 --- a/dashboard/app/handler.go +++ b/dashboard/app/handler.go @@ -92,6 +92,7 @@ func serveTemplate(w http.ResponseWriter, name string, data interface{}) error { type uiHeader struct { Admin bool + URLPath string LoginLink string AnalyticsTrackingID string Subpage string @@ -111,6 +112,7 @@ type cookieData struct { func commonHeaderRaw(c context.Context, r *http.Request) *uiHeader { h := &uiHeader{ Admin: accessLevel(c, r) == AccessAdmin, + URLPath: r.URL.Path, AnalyticsTrackingID: config.AnalyticsTrackingID, } if user.Current(c) == nil { -- cgit mrf-deployment