mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect: handle the /custom-dashboards request from /graph/ page in the same way as from the /vmui/ page
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3322
This commit is contained in:
parent
9fdd1a10c6
commit
9f5b5708ff
1 changed files with 7 additions and 0 deletions
|
@ -186,6 +186,13 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool {
|
||||||
return true
|
return true
|
||||||
case strings.HasPrefix(path, "/graph/"):
|
case strings.HasPrefix(path, "/graph/"):
|
||||||
// This is needed for serving /graph URLs from Prometheus datasource in Grafana.
|
// This is needed for serving /graph URLs from Prometheus datasource in Grafana.
|
||||||
|
if path == "/graph/custom-dashboards" {
|
||||||
|
if err := handleVMUICustomDashboards(w); err != nil {
|
||||||
|
httpserver.Errorf(w, r, "%s", err)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
r.URL.Path = strings.Replace(path, "/graph/", "/vmui/", 1)
|
r.URL.Path = strings.Replace(path, "/graph/", "/vmui/", 1)
|
||||||
vmuiFileServer.ServeHTTP(w, r)
|
vmuiFileServer.ServeHTTP(w, r)
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue