From 79a7ca972b6c180ea6de487b5708dde093206907 Mon Sep 17 00:00:00 2001 From: alpha-nerd-nomyo Date: Wed, 19 Nov 2025 17:05:25 +0100 Subject: [PATCH] initial chart view --- entrypoint.sh | 0 router.py | 5 +- static/index.html | 236 ++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 208 insertions(+), 33 deletions(-) mode change 100644 => 100755 entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh old mode 100644 new mode 100755 diff --git a/router.py b/router.py index 94831f9..9a1f0c8 100644 --- a/router.py +++ b/router.py @@ -1193,9 +1193,10 @@ async def stats_proxy(request: Request, model: Optional[str] = None): status_code=404, detail="No token data found for this model" ) - # Get time series data + # Get time series data for the last 30 days (43200 minutes = 30 days) + # Assuming entries are grouped by minute, 30 days = 43200 entries max time_series = [] - async for entry in db.get_latest_time_series(limit=10): + async for entry in db.get_latest_time_series(limit=50000): if entry['model'] == model: time_series.append({ 'timestamp': entry['timestamp'], diff --git a/static/index.html b/static/index.html index 0ecbf7d..42a7cd7 100644 --- a/static/index.html +++ b/static/index.html @@ -3,6 +3,7 @@ NOMYO Router Dashboard + @@ -267,7 +289,7 @@ Quant Ctx Digest - Token + Token @@ -300,7 +322,97 @@