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

@@ -9,6 +9,8 @@ export const en = {
viewDetails: 'View Details',
changeLog: 'Change Log',
latestUpdate: 'Latest Update',
appCount: 'Number of Spaces',
userCount: 'Number of Users',
latestUpdateDesc: 'Version v0.2.0 release: Added visual workflow editor, model performance monitoring panel, and multi tenant permission management system.',
getStarted: 'Getting Started',
startedDesc: 'Understand the core functions of the platform and quickly get started through graphic guidance and video tutorials. Includes a full process demonstration from creating a space to publishing an application.',
@@ -95,11 +97,11 @@ export const en = {
total_models: 'Total number of available models',
total_spaces: 'Number of active spaces',
total_users: 'Total number of users',
total_apps_runs: 'Number of application runs',
total_running_apps: 'Number of application runs',
desc_models: 'Contains {{ account }} LLMs and {{ nums }} Embeddings',
desc_spaces: 'more than yesterday',
desc_spaces: 'more than last week',
desc_users: 'New additions this week',
desc_apps_runs: "Today's success rate",
desc_running_apps: "Today's success rate",
totalMemoryCapacity: 'Total Memory Capacity',
userMemory: 'User Memory',
knowledgeBaseCount: 'Knowledge Base Count',
@@ -718,6 +720,7 @@ export const en = {
graphTitle: 'Knowledge Graph: The Network of Entity, Relationship and Attribute Associations',
graphTips: 'Explore the entity nodes in the knowledge base and their relationship networks',
sourceDocuments: 'Source Documents',
rebuildGraph: 'Rebuild Graph',
createForm:{
name: 'Name',
embedding_id: 'Embedding',

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: '知识库数量',