From 8531a3b5955b4658bb4fb5b863f56c769e05d05f Mon Sep 17 00:00:00 2001 From: bizwings Date: Fri, 3 Jul 2026 16:32:42 +0800 Subject: [PATCH] feat: dashboard UX optimization + real-time backend stats + health probe fix + pool shuffle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - dashboard.html: major UX overhaul (+657/-308 lines) - server.py: /api/admin/backends now returns real-time RPM and model_count - pool_manager.py: random.shuffle backends for load distribution - config.py: health probe endpoint /v1/models โ†’ /models - docker-compose.yml: add SIDECAR_PRIMARY_WAIT_MAX_RETRIES=6 BIZ-52 post-review optimizations --- config.py | 2 +- dashboard.html | 944 ++++++++++++++++++++++++++++++--------------- docker-compose.yml | 1 + pool_manager.py | 3 + server.py | 19 +- 5 files changed, 659 insertions(+), 310 deletions(-) diff --git a/config.py b/config.py index b1f3d75..1e8ce3b 100644 --- a/config.py +++ b/config.py @@ -39,7 +39,7 @@ class Config: # Health check health_check_interval_seconds: int = 60 health_check_timeout_seconds: int = 10 - health_probe_endpoint: str = "/v1/models" + health_probe_endpoint: str = "/models" # Admin auth admin_token: str = "" diff --git a/dashboard.html b/dashboard.html index f059031..1f01bae 100644 --- a/dashboard.html +++ b/dashboard.html @@ -4,246 +4,350 @@ Sidecar V2 โ€” Provider Pool Dashboard - - -
- - + - -
- -
-
-
-
-
+
+
+

๐Ÿ“Š Dashboard

Provider ๆฑ ๅ…จๅฑ€ๆฆ‚่งˆ

+
+ -- + + +
+
- -
-
-

Provider Backends

- -
- - - - - -
NameLabelPoolStatusRPMModelsActions
-
+
- -
-

Hourly Usage

-
- -
- - - - - -
HourBackendModelRequestsErrorsTokensCostAvg Latency
+ +
+ +
+
Total Requests
--
Error rate: --
+
Total Tokens
--
Prompt: -- ยท Completion: --
+
Total Cost
--
USD
+
Uptime
--
Sidecar V2
+
-

Daily Aggregation

- - - - - -
DatePoolRequestsErrorsTokensCostBackends
-
+ +
+

Primary Pool

--
Total
--
Healthy
--
Cooling
--
Error
+

Fallback Pool

--
Total
--
Healthy
--
Cooling
--
Error
+
- -
-

Cooldown Event History

- - - - - -
TimeBackendConsecutive 429sDurationSummary
-
-
+ +
+

Cost Trend (7 days)

+

Token Usage Trend (7 days)

+
+ + +
Provider Status
+ + + +
NameLabelPoolModelsStatusRPMActions
- + +
+
+

Provider Backends

+ +
+ + + + + +
NameLabelPoolStatusRPMModelsActions
+
+ + +
+

Hourly Usage Statistics

+
+ +
+ + + +
HourBackendModelRequestsErrorsTokensCostAvg Latency
+ +
Daily Aggregation
+ + + +
DatePoolRequestsErrorsTokensCostBackends
+
+ + +
+

Cooldown Event History

+ + + +
TimeBackendConsecutive 429sDurationSummary
+
+ + + + +