mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
fix: 修复API Keys页面时间窗口进度条和Token数值显示问题
- 修复时间窗口限制的请求次数和Token使用量进度条不更新的问题 - 在apiKeyService.getAllApiKeys()中添加获取当前窗口统计数据的逻辑 - 从Redis读取rate_limit:requests和rate_limit:tokens键的值 - 优化Token数值展示,添加K/M单位格式化 - UsageDetailModal组件中5处Token数值改用formatTokenCount - ApiKeysView模型统计中5处Token数值改用formatTokenCount - 统一使用K/M单位简化大数字显示 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -46,10 +46,10 @@
|
||||
<i class="fas fa-coins text-green-500" />
|
||||
</div>
|
||||
<div class="text-2xl font-bold text-gray-900">
|
||||
{{ formatNumber(totalTokens) }}
|
||||
{{ formatTokenCount(totalTokens) }}
|
||||
</div>
|
||||
<div class="text-xs text-gray-600 mt-1">
|
||||
今日: {{ formatNumber(dailyTokens) }}
|
||||
今日: {{ formatTokenCount(dailyTokens) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<span class="text-sm text-gray-600">输入 Token</span>
|
||||
</div>
|
||||
<span class="text-sm font-semibold text-gray-900">
|
||||
{{ formatNumber(inputTokens) }}
|
||||
{{ formatTokenCount(inputTokens) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
@@ -108,7 +108,7 @@
|
||||
<span class="text-sm text-gray-600">输出 Token</span>
|
||||
</div>
|
||||
<span class="text-sm font-semibold text-gray-900">
|
||||
{{ formatNumber(outputTokens) }}
|
||||
{{ formatTokenCount(outputTokens) }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
@@ -120,7 +120,7 @@
|
||||
<span class="text-sm text-gray-600">缓存创建 Token</span>
|
||||
</div>
|
||||
<span class="text-sm font-semibold text-purple-600">
|
||||
{{ formatNumber(cacheCreateTokens) }}
|
||||
{{ formatTokenCount(cacheCreateTokens) }}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
@@ -132,7 +132,7 @@
|
||||
<span class="text-sm text-gray-600">缓存读取 Token</span>
|
||||
</div>
|
||||
<span class="text-sm font-semibold text-purple-600">
|
||||
{{ formatNumber(cacheReadTokens) }}
|
||||
{{ formatTokenCount(cacheReadTokens) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user