mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Application: Make error-template title configurable (#40310)
* Fix error-template title as in index-template.html * Test: fix for AppTitle Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
This commit is contained in:
@@ -133,10 +133,11 @@ func Recovery(cfg *setting.Cfg) web.Handler {
|
||||
|
||||
data := struct {
|
||||
Title string
|
||||
AppTitle string
|
||||
AppSubUrl string
|
||||
Theme string
|
||||
ErrorMsg string
|
||||
}{"Server Error", cfg.AppSubURL, cfg.DefaultTheme, ""}
|
||||
}{"Server Error", "Grafana", cfg.AppSubURL, cfg.DefaultTheme, ""}
|
||||
|
||||
if setting.Env == setting.Dev {
|
||||
if err, ok := r.(error); ok {
|
||||
|
@@ -30,10 +30,11 @@ type ReqContext struct {
|
||||
func (ctx *ReqContext) Handle(cfg *setting.Cfg, status int, title string, err error) {
|
||||
data := struct {
|
||||
Title string
|
||||
AppTitle string
|
||||
AppSubUrl string
|
||||
Theme string
|
||||
ErrorMsg error
|
||||
}{title, cfg.AppSubURL, "dark", nil}
|
||||
}{title, "Grafana", cfg.AppSubURL, "dark", nil}
|
||||
if err != nil {
|
||||
ctx.Logger.Error(title, "error", err)
|
||||
if setting.Env != setting.Prod {
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="theme-color" content="#000" />
|
||||
|
||||
<title>Grafana - Error</title>
|
||||
<title>[[.AppTitle]] - Error</title>
|
||||
|
||||
<base href="[[.AppSubUrl]]/" />
|
||||
|
||||
|
Reference in New Issue
Block a user