From d8daec9bf46bd8bd47e92e34f3b713b4f2961c62 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 21 Feb 2023 15:14:04 +0100 Subject: dashboard: add a feedback button --- dashboard/app/config.go | 2 ++ dashboard/app/handler.go | 2 ++ dashboard/app/subsystems.html | 1 - dashboard/app/templates.html | 6 ++++++ pkg/html/pages/style.css | 5 +++++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dashboard/app/config.go b/dashboard/app/config.go index 8c5535da8..60b511238 100644 --- a/dashboard/app/config.go +++ b/dashboard/app/config.go @@ -55,6 +55,8 @@ type GlobalConfig struct { // Main part of the URL at which the app is reachable. // This URL is used e.g. to construct HTML links contained in the emails sent by the app. AppURL string + // The email address to display on all web pages. + ContactEmail string } // Per-namespace config. diff --git a/dashboard/app/handler.go b/dashboard/app/handler.go index 333d7847d..135378b7b 100644 --- a/dashboard/app/handler.go +++ b/dashboard/app/handler.go @@ -127,6 +127,7 @@ type uiHeader struct { AnalyticsTrackingID string Subpage string Namespace string + ContactEmail string BugCounts *CachedBugStats Namespaces []uiNamespace ShowSubsystems bool @@ -146,6 +147,7 @@ func commonHeaderRaw(c context.Context, r *http.Request) *uiHeader { Admin: accessLevel(c, r) == AccessAdmin, URLPath: r.URL.Path, AnalyticsTrackingID: config.AnalyticsTrackingID, + ContactEmail: config.ContactEmail, } if user.Current(c) == nil { h.LoginLink, _ = user.LoginURL(c, r.URL.String()) diff --git a/dashboard/app/subsystems.html b/dashboard/app/subsystems.html index de8c46134..9314ac557 100644 --- a/dashboard/app/subsystems.html +++ b/dashboard/app/subsystems.html @@ -15,7 +15,6 @@ The list of polled trees. {{template "header" .Header}}

The list of subsystems


(*) Note that the numbers below do not represent the latest data. They are updated once an hour.
- (**) If you have any ideas/suggestions on how to improve this list, feel free to contact us at syzkaller@googlegroups.com. diff --git a/dashboard/app/templates.html b/dashboard/app/templates.html index 0d8d66486..0a2c9301a 100644 --- a/dashboard/app/templates.html +++ b/dashboard/app/templates.html @@ -76,6 +76,12 @@ Use of this source code is governed by Apache 2 LICENSE that can be found in the 📈 Crashes + {{if .ContactEmail}} + + {{end}}
Subsystems list
{{end}} diff --git a/pkg/html/pages/style.css b/pkg/html/pages/style.css index ebeb7d012..b82efd5b1 100644 --- a/pkg/html/pages/style.css +++ b/pkg/html/pages/style.css @@ -33,6 +33,11 @@ h1, h2, h3, h4 { padding-bottom: 6px; } +.position_table .navigation-right { + padding-top: 15px; + text-align: right; +} + table { border: 1px solid #ccc; margin: 20px 5px; -- cgit mrf-deployment