diff --git a/pkg/api/login_oauth.go b/pkg/api/login_oauth.go index 22fcafc8b29..341ff212f10 100644 --- a/pkg/api/login_oauth.go +++ b/pkg/api/login_oauth.go @@ -40,14 +40,14 @@ func GenStateString() string { func OAuthLogin(ctx *middleware.Context) { if setting.OAuthService == nil { - ctx.Handle(404, "login.OAuthLogin(oauth service not enabled)", nil) + ctx.Handle(404, "OAuth not enabled", nil) return } name := ctx.Params(":name") connect, ok := social.SocialMap[name] if !ok { - ctx.Handle(404, "login.OAuthLogin(social login not enabled)", errors.New(name)) + ctx.Handle(404, fmt.Sprintf("No OAuth with name %s configured", name), nil) return } diff --git a/pkg/middleware/middleware.go b/pkg/middleware/middleware.go index 259d800f0a9..f0c952811cd 100644 --- a/pkg/middleware/middleware.go +++ b/pkg/middleware/middleware.go @@ -206,7 +206,9 @@ func (ctx *Context) Handle(status int, title string, err error) { ctx.Data["Title"] = title ctx.Data["AppSubUrl"] = setting.AppSubUrl - ctx.HTML(status, strconv.Itoa(status)) + ctx.Data["Theme"] = "dark" + + ctx.HTML(status, "error") } func (ctx *Context) JsonOK(message string) { diff --git a/pkg/middleware/recovery.go b/pkg/middleware/recovery.go index 0c9dc4670e2..388acc15afc 100644 --- a/pkg/middleware/recovery.go +++ b/pkg/middleware/recovery.go @@ -137,7 +137,7 @@ func Recovery() macaron.Handler { c.JSON(500, resp) } else { - c.HTML(500, "500") + c.HTML(500, "error") } } }() diff --git a/public/app/features/plugins/partials/ds_list.html b/public/app/features/plugins/partials/ds_list.html index b247c59ab66..fd537fc47d4 100644 --- a/public/app/features/plugins/partials/ds_list.html +++ b/public/app/features/plugins/partials/ds_list.html @@ -52,7 +52,7 @@ - - - - - - Grafana - - - - - - - -
-
- - Proxy authentication required - -
- -
-

Proxy authenticaion required

-
-
- - diff --git a/public/views/500.html b/public/views/500.html deleted file mode 100644 index e0e88803a56..00000000000 --- a/public/views/500.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - Grafana - Error - - - - - - - - - -
- -
-
-
-
-
[[.Title]]
-
- [[if .ErrorMsg]] -
[[.ErrorMsg]]
- [[end]] -
-
-
-
-

Check the Grafana server logs for the detailed error message.

-
-
-
- - diff --git a/public/views/error.html b/public/views/error.html new file mode 100644 index 00000000000..139608c47bf --- /dev/null +++ b/public/views/error.html @@ -0,0 +1,57 @@ + + + + + + + + + Grafana + + + + + + + + + + + +
+
+ +
+
+
+
+
+
[[.Title]]
+
+
+
+ [[if .ErrorMsg]] +

Error details

+
+
[[.ErrorMsg]]
+
+ [[end]] +
+

Check the Grafana server logs for the detailed error message.

+
+
+
+ +