diff --git a/web/admin-spa/src/i18n/locales/en.js b/web/admin-spa/src/i18n/locales/en.js index ecec84d6..52bf99cc 100644 --- a/web/admin-spa/src/i18n/locales/en.js +++ b/web/admin-spa/src/i18n/locales/en.js @@ -215,5 +215,106 @@ export default { passwordPlaceholder: 'Please enter password', loginButton: 'Login', loggingIn: 'Logging in...' + }, + + // Dashboard page + dashboard: { + // Main stats cards + totalApiKeys: 'Total API Keys', + activeApiKeys: 'Active', + serviceAccounts: 'Service Accounts', + normalAccounts: 'Normal', + abnormalAccounts: 'Abnormal', + pausedAccounts: 'Paused', + rateLimitedAccounts: 'Rate Limited', + todayRequests: 'Today Requests', + totalRequests: 'Total Requests', + systemStatus: 'System Status', + uptime: 'Uptime', + + // Platform accounts tooltip + claudeAccount: 'Claude: {total} accounts (Normal: {normal})', + consoleAccount: 'Console: {total} accounts (Normal: {normal})', + geminiAccount: 'Gemini: {total} accounts (Normal: {normal})', + bedrockAccount: 'Bedrock: {total} accounts (Normal: {normal})', + openaiAccount: 'OpenAI: {total} accounts (Normal: {normal})', + azureOpenaiAccount: 'Azure OpenAI: {total} accounts (Normal: {normal})', + + // Token stats cards + todayToken: 'Today Tokens', + totalTokenConsumption: 'Total Token Consumption', + inputTokens: 'Input', + outputTokens: 'Output', + cacheCreateTokens: 'Cache Create', + cacheReadTokens: 'Cache Read', + + // Real-time metrics + realtimeRPM: 'Realtime RPM', + realtimeTPM: 'Realtime TPM', + requestsPerMinute: 'Requests per Minute', + tokensPerMinute: 'Tokens per Minute', + historicalData: 'Historical Data', + minutes: 'minutes', + + // Charts section + modelDistributionAndTrend: 'Model Usage Distribution & Token Usage Trends', + + // Date filter presets + today: 'Today', + yesterday: 'Yesterday', + last7Days: 'Last 7 Days', + last30Days: 'Last 30 Days', + thisWeek: 'This Week', + lastWeek: 'Last Week', + thisMonth: 'This Month', + lastMonth: 'Last Month', + + // Granularity buttons + byDay: 'By Day', + byHour: 'By Hour', + + // Date picker + startDatePlaceholder: 'Start Date', + endDatePlaceholder: 'End Date', + dateSeparator: 'to', + maxHours24: 'Maximum 24 hours', + + // Auto refresh controls + autoRefresh: 'Auto Refresh', + refresh: 'Refresh', + refreshing: 'Refreshing', + refreshDataNow: 'Refresh data now', + + // Charts + tokenUsageDistribution: 'Token Usage Distribution', + detailedStatistics: 'Detailed Statistics', + noModelUsageData: 'No model usage data available', + + // Table headers + model: 'Model', + requestCount: 'Requests', + totalTokens: 'Total Tokens', + cost: 'Cost', + percentage: 'Percentage', + + // Trend charts + tokenUsageTrend: 'Token Usage Trend', + apiKeysUsageTrend: 'API Keys Usage Trend', + requestsCount: 'Requests Count', + tokenCount: 'Token Count', + totalApiKeysCount: 'Total {count} API Keys', + showingTop10: 'Total {count} API Keys, showing top 10 by usage', + + // Chart labels + inputTokensLabel: 'Input Tokens', + outputTokensLabel: 'Output Tokens', + cacheCreateTokensLabel: 'Cache Create Tokens', + cacheReadTokensLabel: 'Cache Read Tokens', + costLabel: 'Cost (USD)', + requestsLabel: 'Requests', + time: 'Time', + date: 'Date', + tokenQuantity: 'Token Quantity', + requestsQuantity: 'Requests Count' } } diff --git a/web/admin-spa/src/i18n/locales/zh-cn.js b/web/admin-spa/src/i18n/locales/zh-cn.js index 50fbda09..a7be4244 100644 --- a/web/admin-spa/src/i18n/locales/zh-cn.js +++ b/web/admin-spa/src/i18n/locales/zh-cn.js @@ -215,5 +215,106 @@ export default { passwordPlaceholder: '请输入密码', loginButton: '登录', loggingIn: '登录中...' + }, + + // Dashboard page + dashboard: { + // Main stats cards + totalApiKeys: '总 API Keys', + activeApiKeys: '活跃', + serviceAccounts: '服务账户', + normalAccounts: '正常', + abnormalAccounts: '异常', + pausedAccounts: '停止调度', + rateLimitedAccounts: '限流', + todayRequests: '今日请求', + totalRequests: '总请求', + systemStatus: '系统状态', + uptime: '运行时间', + + // Platform accounts tooltip + claudeAccount: 'Claude: {total} 个 (正常: {normal})', + consoleAccount: 'Console: {total} 个 (正常: {normal})', + geminiAccount: 'Gemini: {total} 个 (正常: {normal})', + bedrockAccount: 'Bedrock: {total} 个 (正常: {normal})', + openaiAccount: 'OpenAI: {total} 个 (正常: {normal})', + azureOpenaiAccount: 'Azure OpenAI: {total} 个 (正常: {normal})', + + // Token stats cards + todayToken: '今日Token', + totalTokenConsumption: '总Token消耗', + inputTokens: '输入', + outputTokens: '输出', + cacheCreateTokens: '缓存创建', + cacheReadTokens: '缓存读取', + + // Real-time metrics + realtimeRPM: '实时RPM', + realtimeTPM: '实时TPM', + requestsPerMinute: '每分钟请求数', + tokensPerMinute: '每分钟Token数', + historicalData: '历史数据', + minutes: '分钟', + + // Charts section + modelDistributionAndTrend: '模型使用分布与Token使用趋势', + + // Date filter presets (would be populated from dateFilter.presetOptions) + today: '今日', + yesterday: '昨日', + last7Days: '迗 7 天', + last30Days: '迗 30 天', + thisWeek: '本周', + lastWeek: '上周', + thisMonth: '本月', + lastMonth: '上月', + + // Granularity buttons + byDay: '按天', + byHour: '按小时', + + // Date picker + startDatePlaceholder: '开始日期', + endDatePlaceholder: '结束日期', + dateSeparator: '至', + maxHours24: '最多24小时', + + // Auto refresh controls + autoRefresh: '自动刷新', + refresh: '刷新', + refreshing: '刷新中', + refreshDataNow: '立即刷新数据', + + // Charts + tokenUsageDistribution: 'Token使用分布', + detailedStatistics: '详细统计数据', + noModelUsageData: '暂无模型使用数据', + + // Table headers + model: '模型', + requestCount: '请求数', + totalTokens: '总Token', + cost: '费用', + percentage: '占比', + + // Trend charts + tokenUsageTrend: 'Token使用趋势', + apiKeysUsageTrend: 'API Keys 使用趋势', + requestsCount: '请求次数', + tokenCount: 'Token 数量', + totalApiKeysCount: '共 {count} 个 API Key', + showingTop10: '共 {count} 个 API Key,显示使用量前 10 个', + + // Chart labels + inputTokensLabel: '输入Token', + outputTokensLabel: '输出Token', + cacheCreateTokensLabel: '缓存创建Token', + cacheReadTokensLabel: '缓存读取Token', + costLabel: '费用 (USD)', + requestsLabel: '请求数', + time: '时间', + date: '日期', + tokenQuantity: 'Token数量', + requestsQuantity: '请求次数' } } diff --git a/web/admin-spa/src/i18n/locales/zh-tw.js b/web/admin-spa/src/i18n/locales/zh-tw.js index df3c1186..b4e61a50 100644 --- a/web/admin-spa/src/i18n/locales/zh-tw.js +++ b/web/admin-spa/src/i18n/locales/zh-tw.js @@ -215,5 +215,106 @@ export default { passwordPlaceholder: '請輸入密碼', loginButton: '登錄', loggingIn: '登錄中...' + }, + + // Dashboard page + dashboard: { + // Main stats cards + totalApiKeys: '總 API Keys', + activeApiKeys: '活躍', + serviceAccounts: '服務帳戶', + normalAccounts: '正常', + abnormalAccounts: '異常', + pausedAccounts: '停止調度', + rateLimitedAccounts: '限流', + todayRequests: '今日請求', + totalRequests: '總請求', + systemStatus: '系統狀態', + uptime: '運行時間', + + // Platform accounts tooltip + claudeAccount: 'Claude: {total} 個 (正常: {normal})', + consoleAccount: 'Console: {total} 個 (正常: {normal})', + geminiAccount: 'Gemini: {total} 個 (正常: {normal})', + bedrockAccount: 'Bedrock: {total} 個 (正常: {normal})', + openaiAccount: 'OpenAI: {total} 個 (正常: {normal})', + azureOpenaiAccount: 'Azure OpenAI: {total} 個 (正常: {normal})', + + // Token stats cards + todayToken: '今日Token', + totalTokenConsumption: '總Token消耗', + inputTokens: '輸入', + outputTokens: '輸出', + cacheCreateTokens: '快取建立', + cacheReadTokens: '快取讀取', + + // Real-time metrics + realtimeRPM: '即時RPM', + realtimeTPM: '即時TPM', + requestsPerMinute: '每分钟請求數', + tokensPerMinute: '每分钟Token數', + historicalData: '歷史資料', + minutes: '分钟', + + // Charts section + modelDistributionAndTrend: '模型使用分佈與Token使用趋勢', + + // Date filter presets + today: '今日', + yesterday: '昨日', + last7Days: '近 7 天', + last30Days: '近 30 天', + thisWeek: '本週', + lastWeek: '上週', + thisMonth: '本月', + lastMonth: '上月', + + // Granularity buttons + byDay: '按日', + byHour: '按小時', + + // Date picker + startDatePlaceholder: '開始日期', + endDatePlaceholder: '結束日期', + dateSeparator: '至', + maxHours24: '最多24小時', + + // Auto refresh controls + autoRefresh: '自動刷新', + refresh: '刷新', + refreshing: '刷新中', + refreshDataNow: '立即刷新資料', + + // Charts + tokenUsageDistribution: 'Token使用分佈', + detailedStatistics: '詳細統計資料', + noModelUsageData: '暫無模型使用資料', + + // Table headers + model: '模型', + requestCount: '請求數', + totalTokens: '總Token', + cost: '費用', + percentage: '占比', + + // Trend charts + tokenUsageTrend: 'Token使用趋勢', + apiKeysUsageTrend: 'API Keys 使用趋勢', + requestsCount: '請求次數', + tokenCount: 'Token 數量', + totalApiKeysCount: '共 {count} 個 API Key', + showingTop10: '共 {count} 個 API Key,顯示使用量前 10 個', + + // Chart labels + inputTokensLabel: '輸入Token', + outputTokensLabel: '輸出Token', + cacheCreateTokensLabel: '快取建立Token', + cacheReadTokensLabel: '快取讀取Token', + costLabel: '費用 (USD)', + requestsLabel: '請求數', + time: '時間', + date: '日期', + tokenQuantity: 'Token數量', + requestsQuantity: '請求次數' } } diff --git a/web/admin-spa/src/views/DashboardView.vue b/web/admin-spa/src/views/DashboardView.vue index 17b7d361..f668fd20 100644 --- a/web/admin-spa/src/views/DashboardView.vue +++ b/web/admin-spa/src/views/DashboardView.vue @@ -8,13 +8,13 @@
- 总API Keys + {{ t('dashboard.totalApiKeys') }}
{{ dashboardData.totalApiKeys }}
- 活跃: {{ dashboardData.activeApiKeys || 0 }} + {{ t('dashboard.activeApiKeys') }}: {{ dashboardData.activeApiKeys || 0 }}