feat: add monitoring settings tab, workbench view, and inspection alert improvements
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled

This commit is contained in:
2026-10-30 12:12:04 +08:00
committed by trae-solo-agent
parent 16dd04f746
commit 4a02370006
26 changed files with 2569 additions and 233 deletions

View File

@@ -1374,7 +1374,7 @@ export const useVaultState = () => {
// 并行 fetch 所有 vault 数据
const results = await Promise.allSettled([
fetch(base("/api/devices")).then(r => r.json()),
fetch(base(`${apiBase}/hosts`)).then(r => r.json()),
fetch(base(`${apiBase}/keys`)).then(r => r.json()),
fetch(base(`${apiBase}/proxies`)).then(r => r.json()),
fetch(base(`${apiBase}/port-forwards`)).then(r => r.json()),
@@ -1390,22 +1390,11 @@ export const useVaultState = () => {
? (results[idx]?.value as any).data ?? (results[idx]?.value as any).devices ?? fallback
: fallback;
// hosts
const devicesData = getOk(0, []);
if (Array.isArray(devicesData)) {
const remoteHosts: Host[] = devicesData.map((d: any) => {
const catalogId = d.catalog_id || d.type || "";
return {
id: d.host_id || crypto.randomUUID(),
label: d.label || d.hostname || d.host_id,
hostname: d.hostname || "",
port: 22, username: "", tags: [], os: "linux",
deviceType: /switch|firewall|router/i.test(catalogId) ? "network" : "general",
distro: catalogId, distroMode: "auto",
} as any;
});
hostsRef.current = remoteHosts;
setHosts(remoteHosts);
// hosts(从 /api/vault/hosts 来,已脱敏无密码)
const hostsData = getOk(0, []);
if (Array.isArray(hostsData)) {
hostsRef.current = hostsData as Host[];
setHosts(hostsData as Host[]);
}
// keys(已被 remoteHttpServer strip 敏感字段)
const keysData = getOk(1, []);