feat(dashboard): add statistics API and enhance homepage dashboard cards

- Add Query and DataResponse interfaces to common API module
- Implement getDashboardStatistics API endpoint for fetching dashboard metrics
- Update TopCardList component to display real dashboard data with dynamic values
- Replace hardcoded dashboard metrics with actual API response data
- Add support for calculating and displaying weekly growth rates for spaces and users
- Update dashboard card labels and descriptions for models, spaces, users, and apps
- Add "Rebuild Graph" button translation to knowledge graph card (en/zh)
- Add appCount and userCount translation keys for dashboard display
- Fix dashboard metric key naming consistency (total_apps_runs → total_running_apps)
- Update dashboard descriptions to reflect weekly comparisons instead of daily
- Improve data binding between API response and UI components for real-time statistics
This commit is contained in:
yujiangping
2026-01-05 16:46:10 +08:00
parent f31341151f
commit 3d4c807a87
8 changed files with 174 additions and 62 deletions

View File

@@ -10,6 +10,8 @@ export const zh = {
changeLog: '变更日志',
getStarted:'快速开始',
latestUpdate: '最新更新',
appCount: '应用数量',
userCount: '用户数量',
latestUpdateDesc: '版本 v0.2.0 发布:新增了可视化工作流编辑器、模型性能监控面板以及多租户权限管理系统。',
startedDesc: '了解该平台的核心功能,并通过图形指引和视频教程快速上手。包含从创建空间到发布应用程序的整个操作流程演示。',
spaceTitle:'记忆熊智能空间管理平台',
@@ -330,6 +332,7 @@ export const zh = {
sourceDocuments: '来源文档',
graphTitle: '知识图谱:实体、关系与属性的关联网络',
graphTips: '探索知识库中的实体节点及其关系脉络',
rebuildGraph: '重建图谱',
createForm: {
name: '名称',
embedding_id: '嵌入模型',
@@ -667,11 +670,11 @@ export const zh = {
total_models: '可用模型总数',
total_spaces: '活跃空间数量',
total_users: '用户总数',
total_apps_runs: '应用运行次数',
total_running_apps: '应用运行次数',
desc_models: '包含 {{ account }} 个大语言模型和 {{ nums }} 个嵌入模型',
desc_spaces: '比昨天多',
desc_spaces: '多于上周',
desc_users: '本周新增',
desc_apps_runs: '今日成功率',
desc_running_apps: '今日成功率',
totalMemoryCapacity: '总记忆容量',
userMemory: '用户记忆',
knowledgeBaseCount: '知识库数量',