refactor(dashboard): switch usage charts to route group_by, rename Models card

Align dashboard with the route dimension introduced in the previous
commit:

* Token Usage / API Requests pie charts query the breakdown API with
  `group_by: ['date', 'route']` and aggregate via the new `route`
  dimension in `buildUsageLabel`. Visible chart titles keep the existing
  "by Model" wording — only the underlying data dim changed.
* Overview "Models" card label switched to `dashboard.deployments`
  ("部署" / "Deployments"), and the Active Models table heading to
  `dashboard.activeDeployments`. These reflect the underlying entity
  (model deployments) more accurately now that routes are the
  user-facing model concept.
* Drop 11 unused dashboard locale keys (`dashboard.title`,
  `dashboard.models`, `dashboard.allocategpus`, `dashboard.instances`,
  `dashboard.disk`, `dashboard.diskutilization`, `dashboard.apirequest`,
  `dashboard.activeModels`, `dashboard.activeUsers`,
  `dashboard.activeModels.name`, `dashboard.runninginstances`) — no
  remaining references in `src/` after the rename. Locale parity check
  passes.
This commit is contained in:
Yuxing Deng
2026-05-19 16:50:42 +08:00
parent 38107a67fe
commit 44e5b78d29
10 changed files with 26 additions and 62 deletions
+2 -11
View File
@@ -1,32 +1,23 @@
export default {
'dashboard.title': '概览',
'dashboard.workers': '节点',
'dashboard.models': '模型',
'dashboard.deployments': '部署',
'dashboard.clusters': '集群',
'dashboard.totalgpus': 'GPUs',
'dashboard.allocategpus': '已分配 GPU 数量',
'dashboard.instances': '实例',
'dashboard.systemload': '系统负载',
'dashboard.memory': '内存',
'dashboard.disk': '磁盘',
'dashboard.vram': '显存',
'dashboard.cpuutilization': '平均 CPU 利用率',
'dashboard.memoryutilization': '平均内存利用率',
'dashboard.diskutilization': '磁盘利用率',
'dashboard.vramutilization': '平均显存利用率',
'dashboard.gpuutilization': '平均 GPU 利用率',
'dashboard.usage': '使用量',
'dashboard.apirequest': 'API 请求',
'dashboard.tokens': 'Token 使用量',
'dashboard.topusers': '用户排行',
'dashboard.activeModels': '活跃模型',
'dashboard.activeUsers': '活跃用户',
'dashboard.activeDeployments': '活跃部署',
'dashboard.tokenUsageByModel': '按模型统计 Token 使用量',
'dashboard.apiRequestsByModel': '按模型统计 API 请求数',
'dashboard.topTokenUsageByUser': '用户 Token 使用量 Top 10',
'dashboard.topTokenUsageByApiKey': 'API 密钥 Token 使用量 Top 10',
'dashboard.activeModels.name': '模型名称',
'dashboard.runninginstances': '运行实例',
'dashboard.allocatevram': '已分配显存 / 内存',
'dashboard.usage.selectuser': '选择用户',
'dashboard.usage.selectmodel': '选择模型',