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:
@@ -400,7 +400,7 @@ const Private: FC = () => {
|
||||
graphrag: {
|
||||
use_graphrag: false,
|
||||
scene_name: '',
|
||||
entity_types: '',
|
||||
entity_types: [],
|
||||
method: '',
|
||||
resolution: false,
|
||||
community: false
|
||||
@@ -725,7 +725,10 @@ const Private: FC = () => {
|
||||
</div>
|
||||
<div className="rb:rounded rb:max-h-[calc(100%-100px)] rb:overflow-y-auto">
|
||||
{isGraph ? (
|
||||
<KnowledgeGraphCard knowledgeBaseId={knowledgeBase.id} />
|
||||
<KnowledgeGraphCard
|
||||
knowledgeBase={knowledgeBase}
|
||||
onRebuildGraph={() => modalRef.current?.handleOpen(knowledgeBase, 'rebuild')}
|
||||
/>
|
||||
) : (
|
||||
<Table
|
||||
ref={tableRef}
|
||||
|
||||
Reference in New Issue
Block a user