From 7b5a29fc8fdddd8d8469dd7f549f33ad414e4dfc Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Wed, 8 Jul 2015 15:14:57 +0100 Subject: [PATCH] web: Fix regression in .Path .Path is documented as removing /consoles/, recent changes added in a leading / which broke the provided console templates menu system. --- web/web.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/web.go b/web/web.go index 2a6c4f963..e2642d9f5 100644 --- a/web/web.go +++ b/web/web.go @@ -24,6 +24,7 @@ import ( "os" "path/filepath" "sort" + "strings" "sync" "time" @@ -244,7 +245,7 @@ func (h *Handler) consoles(w http.ResponseWriter, r *http.Request) { }{ RawParams: rawParams, Params: params, - Path: name, + Path: strings.TrimLeft(name, "/"), } tmpl := template.NewTemplateExpander(string(text), "__console_"+name, data, clientmodel.Now(), h.queryEngine, h.options.ExternalURL.Path)