aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/handler.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-04-05 16:00:20 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-04-05 17:56:42 +0200
commitfa763482c3e2ef60aa7210e1bff6b206ef814229 (patch)
tree1eb39831df3bbe69b4acb87ecc1ff5d80ee3d42a /dashboard/app/handler.go
parentecbfbf0bcfe4febf21a44d8e008b72e787b9fe98 (diff)
dashboard/app: add admin page
Add /admin page and move logs, jobs, manager onto it. The main page is too overloaded and takes too long to load. We need to start splitting it. This is a first step.
Diffstat (limited to 'dashboard/app/handler.go')
-rw-r--r--dashboard/app/handler.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/dashboard/app/handler.go b/dashboard/app/handler.go
index 167ca5857..7fc133bee 100644
--- a/dashboard/app/handler.go
+++ b/dashboard/app/handler.go
@@ -73,12 +73,14 @@ func serveTemplate(w http.ResponseWriter, name string, data interface{}) error {
}
type uiHeader struct {
+ Admin bool
LoginLink string
AnalyticsTrackingID string
}
func commonHeader(c context.Context, r *http.Request) *uiHeader {
h := &uiHeader{
+ Admin: accessLevel(c, r) == AccessAdmin,
AnalyticsTrackingID: config.AnalyticsTrackingID,
}
if user.Current(c) == nil {