chore: [cluster] add build version information to the home page for consistency with other projects

This commit is contained in:
Jiekun
2026-01-26 00:12:08 +08:00
parent b2b146b660
commit 15fe011876
3 changed files with 10 additions and 9 deletions

View File

@@ -202,9 +202,9 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool {
return false
}
w.Header().Add("Content-Type", "text/html; charset=utf-8")
fmt.Fprintf(w, `vminsert - a component of VictoriaMetrics cluster<br/>
<a href="https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/">docs</a><br>
`)
fmt.Fprintf(w, `vminsert - a component of VictoriaMetrics cluster<br/>`)
fmt.Fprintf(w, "Version %s<br>", buildinfo.Version)
fmt.Fprintf(w, `<a href="https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/">docs</a><br>`)
return true
}
p, err := httpserver.ParsePath(r.URL.Path)

View File

@@ -566,9 +566,9 @@ func handleStaticAndSimpleRequests(w http.ResponseWriter, r *http.Request, path
return false
}
w.Header().Add("Content-Type", "text/html; charset=utf-8")
fmt.Fprintf(w, `vmselect - a component of VictoriaMetrics cluster<br/>
<a href="https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/">docs</a><br>
`)
fmt.Fprintf(w, `vmselect - a component of VictoriaMetrics cluster<br/>`)
fmt.Fprintf(w, "Version %s<br>", buildinfo.Version)
fmt.Fprintf(w, `<a href="https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/">docs</a><br>`)
return true
}
if path == "/api/v1/status/top_queries" {
@@ -597,6 +597,7 @@ func handleStaticAndSimpleRequests(w http.ResponseWriter, r *http.Request, path
}
w.Header().Add("Content-Type", "text/html; charset=utf-8")
fmt.Fprintf(w, "<h2>VictoriaMetrics cluster - vmselect</h2></br>")
fmt.Fprintf(w, "Version %s<br>", buildinfo.Version)
fmt.Fprintf(w, "See <a href='https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/#url-format'>docs</a></br>")
fmt.Fprintf(w, "Useful endpoints:</br>")
fmt.Fprintf(w, `<a href="vmui">Web UI</a><br>`)

View File

@@ -239,9 +239,9 @@ func newRequestHandler(strg *storage.Storage) httpserver.RequestHandler {
return false
}
w.Header().Add("Content-Type", "text/html; charset=utf-8")
fmt.Fprintf(w, `vmstorage - a component of VictoriaMetrics cluster<br/>
<a href="https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/">docs</a><br>
`)
fmt.Fprintf(w, `vmstorage - a component of VictoriaMetrics cluster<br/>`)
fmt.Fprintf(w, "Version %s<br>", buildinfo.Version)
fmt.Fprintf(w, `<a href="https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/">docs</a><br>`)
return true
}
return requestHandler(w, r, strg)