总览与客户端实例按 sim 在上 live 在下排序,实例表增加模式列。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-04 10:17:05 +08:00
parent d9bf3f7915
commit 50963a25fc
5 changed files with 184 additions and 98 deletions
+3 -1
View File
@@ -302,6 +302,8 @@ def fetch_client_version(inst: dict[str, Any]) -> dict[str, Any]:
"short_sha": "",
"branch": "",
"dirty": False,
"mode": "",
"mode_label": "",
"msg": "",
"instance_id": inst.get("id"),
"instance_name": inst.get("name"),
@@ -320,7 +322,7 @@ def fetch_client_version(inst: dict[str, Any]) -> dict[str, Any]:
if data is None:
out["msg"] = err or f"HTTP {r.status_code}"
return out
for key in ("sha", "short_sha", "branch", "dirty", "msg", "repo"):
for key in ("sha", "short_sha", "branch", "dirty", "msg", "repo", "mode", "mode_label"):
if key in data:
out[key] = data.get(key)
out["ok"] = bool(data.get("ok")) and r.status_code == 200