From 637a3cf2554a90c4b10085f53c377647047872a1 Mon Sep 17 00:00:00 2001 From: tyuXX Date: Sun, 25 Oct 2026 20:13:19 +0000 Subject: [PATCH] feat(ui): redesign stats page with gsdistance.org theme --- src/routes.ts | 2 +- src/stats.ts | 1332 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 889 insertions(+), 445 deletions(-) diff --git a/src/routes.ts b/src/routes.ts index c805872..f7a8e95 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -437,7 +437,7 @@ router.get('/stats', (req: Request, res: Response) => { // GET /favicon.ico (Avoid 404 logs from browser favicon requests) router.get('/favicon.ico', (req: Request, res: Response) => { res.setHeader('Content-Type', 'image/svg+xml'); - res.send(``); + res.send(``); }); export default router; diff --git a/src/stats.ts b/src/stats.ts index f2d10cf..20bfdc7 100644 --- a/src/stats.ts +++ b/src/stats.ts @@ -361,23 +361,38 @@ export class StatsTracker { - GeminiRevolver — Public API Statistics + GeminiRevolver — API Telemetry & Statistics + + -
- -
- -
- - +
+ + + +
+ - + +
+

GeminiRevolver

+

OpenAI v1 Compatible Gemini Key Rotation Gateway

+
+
+ + Model: ${server.model} +
+
+ + Key Pool: ${server.configuredKeysCount} Keys Rotating +
+
+ + Uptime: ${uptimeFormatted} +
+
+
+ + +
+
-
-
- Total Requests - - - +
+
+ Total Requests +
${requests.total.toLocaleString()}
- ${requests.wentThrough.toLocaleString()} went through - ${requests.failed.toLocaleString()} failed - ${requests.cancelled.toLocaleString()} cancelled -
-
- - -
-
- Total Tokens - - - -
-
${tokens.total.toLocaleString()}
-
- Input: ${tokens.input.toLocaleString()} - Output: ${tokens.output.toLocaleString()} + ${requests.wentThrough.toLocaleString()} ok + • + ${requests.failed.toLocaleString()} err + • + ${requests.cancelled.toLocaleString()} drop
-
-
- Success Rate - - - +
+
+ Success Rate +
${requests.successRate}%
- Went through vs all incoming requests + Completed vs total incoming calls
- -
-
- Active In-Flight - - - + +
+
+ Total Tokens + +
+
${tokens.total.toLocaleString()}
+
+ In: ${tokens.input.toLocaleString()} + • + Out: ${tokens.output.toLocaleString()} +
+
+ + +
+
+ Active In-Flight +
${activeRequests}
- ${activeRequests === 0 ? 'Currently idle' : 'Processing completions'} + ${activeRequests === 0 ? 'Idle • Ready for requests' : 'Processing active completions'}
-
- -
-
-
- - - +
+ +
+
+
+ Request Breakdown
- - ${requests.total.toLocaleString()} total - + ${requests.total.toLocaleString()} total
-
-
-
-
+
+
+
+
-
-
-
- +
+
+
+ Went Through (Completed)
-
+
${requests.wentThrough.toLocaleString()} - ${wentThroughPct}% + ${wentThroughPct}%
-
-
- +
+
+ Failed (Error / Rate Limit)
-
+
${requests.failed.toLocaleString()} - ${failedPct}% + ${failedPct}%
-
-
- +
+
+ Cancelled (Client Disconnected)
-
+
${requests.cancelled.toLocaleString()} - ${cancelledPct}% + ${cancelledPct}%
- -
-
-
- - - - Token Breakdown + +
+
+
+ + Token Distribution
- - ${tokens.total.toLocaleString()} tokens - + ${tokens.total.toLocaleString()} tokens
-
-
-
+
+
+
-
-
-
- +
+
+
+ Input Tokens (Prompt)
-
+
${tokens.input.toLocaleString()} - ${inputTokensPct}% + ${inputTokensPct}%
-
-
- +
+
+ Output Tokens (Completion)
-
+
${tokens.output.toLocaleString()} - ${outputTokensPct}% + ${outputTokensPct}%
-
-
- +
+
+ Total Combined Tokens
-
+
${tokens.total.toLocaleString()} - 100.0% + 100.0%
- -
-
- Active Model Engine - ${server.model} + +
+
+ Active Model Engine + ${server.model}
-
- API Key Pool - ${server.configuredKeysCount} keys rotating +
+ Key Rotation Pool + ${server.configuredKeysCount} keys rotating
-
- Gateway Uptime - ${uptimeFormatted} +
+ Gateway Uptime + ${uptimeFormatted}
-
- Last Request Received - ${lastRequestAt ? new Date(lastRequestAt).toLocaleTimeString() : 'None yet'} +
+ Last Request + ${lastRequestAt ? new Date(lastRequestAt).toLocaleTimeString() : 'None yet'}
- - - - -
- Privacy & Security Guarantee: This public dashboard provides high-level request counts and token volume stats only. - In compliance with privacy standards, no request bodies, prompt messages, completion texts, sender IPs, client headers, or API secrets are ever stored or exposed on this page. + +
+ Zero-Knowledge Privacy: This public dashboard provides aggregate telemetry counts only. No prompt messages, completion texts, client IPs, user tokens, or Gemini API keys are ever stored or exposed.
+
- - - + +