mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
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.
This commit is contained in:
parent
1d6d39a9ed
commit
7b5a29fc8f
|
@ -24,6 +24,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -244,7 +245,7 @@ func (h *Handler) consoles(w http.ResponseWriter, r *http.Request) {
|
||||||
}{
|
}{
|
||||||
RawParams: rawParams,
|
RawParams: rawParams,
|
||||||
Params: params,
|
Params: params,
|
||||||
Path: name,
|
Path: strings.TrimLeft(name, "/"),
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpl := template.NewTemplateExpander(string(text), "__console_"+name, data, clientmodel.Now(), h.queryEngine, h.options.ExternalURL.Path)
|
tmpl := template.NewTemplateExpander(string(text), "__console_"+name, data, clientmodel.Now(), h.queryEngine, h.options.ExternalURL.Path)
|
||||||
|
|
Loading…
Reference in a new issue