From 0b02fd580bc0fc0c12a7349c4e2a32f433fc6944 Mon Sep 17 00:00:00 2001 From: xiaoxixi Date: Sun, 26 Jul 2026 21:32:54 +0800 Subject: [PATCH] feat(webui): overview runtime dashboard --- webui/src/pages/OverviewPage.svelte | 198 ++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 webui/src/pages/OverviewPage.svelte diff --git a/webui/src/pages/OverviewPage.svelte b/webui/src/pages/OverviewPage.svelte new file mode 100644 index 0000000..f804e86 --- /dev/null +++ b/webui/src/pages/OverviewPage.svelte @@ -0,0 +1,198 @@ + + +
+ {#if error && !status} +
+ + 离线 — {error} +
+ {:else if status} +
+
+ + {running ? "RUNNING" : "IDLE"} + GEN {status.generation} +
+
+ {uptime} + v{status.version} + WS {status.ws_connections} + BG {status.background_tasks} + {status.phase} +
+
+ + {#if error} +
⚠ {error}
+ {/if} + +
+ + + + +
+ +
+ PROVIDERS + + + + + + {#each status.providers || [] as p} + + + + + + + + + + {:else} + + {/each} + +
名称模型状态延迟Tokens InTokens OutCost
{p.name}{p.model}{p.status}{fmt(p.tokens_in)}{fmt(p.tokens_out)}${(p.cost || 0).toFixed(3)}
暂无 Provider
+
+ +
+ MESSAGE BUS +
+
+ Inbound + + {status.bus?.inbound?.depth || 0}/{status.bus?.inbound?.cap || 1} +
+
+ Outbound + + {status.bus?.outbound?.depth || 0}/{status.bus?.outbound?.cap || 1} +
+
+ Control + + {status.bus?.control?.depth || 0}/{status.bus?.control?.cap || 1} +
+
+ +
+ +
+
+ CHANNELS +
+ {#each status.channels || [] as ch} +
+ {ch.name} + {ch.status} +
+ {:else} + 暂无 Channel + {/each} +
+
+ +
+ SCHEDULER +
+ Jobs: {status.scheduler?.jobs || 0} + Enabled: {status.scheduler?.enabled || 0} + 0}>Failed: {status.scheduler?.failed_jobs || 0} + Next: {formatTime(status.scheduler?.next_run_at)} +
+
+
+ {:else} +
加载中…
+ {/if} +
+ +