feat(web): display backend version info in sidebar (#2087)

* feat(web): display backend version info in sidebar

* fix(web): improve version parsing and timeout behavior

* refactor(web): remove useless --version fallback

* feat(web): implement version info caching and improve retrieval logic

* fix(web): clarify version timeout rationale

* fix(web): harden gateway version probing and tests

* style(web): split regexp to two lines for lint
This commit is contained in:
LC
2026-03-30 16:44:50 +08:00
committed by GitHub
parent e88df4ff9c
commit ff0266a40e
8 changed files with 725 additions and 5 deletions
+11
View File
@@ -13,6 +13,13 @@ export interface LauncherConfig {
allowed_cidrs: string[]
}
export interface SystemVersionInfo {
version: string
git_commit?: string
build_time?: string
go_version: string
}
async function request<T>(path: string, options?: RequestInit): Promise<T> {
const res = await launcherFetch(path, options)
if (!res.ok) {
@@ -62,3 +69,7 @@ export async function setLauncherConfig(
body: JSON.stringify(payload),
})
}
export async function getSystemVersionInfo(): Promise<SystemVersionInfo> {
return request<SystemVersionInfo>("/api/system/version")
}