feat: add dashboard cahrts display
This commit is contained in:
+16
-1
@@ -102,7 +102,9 @@ export const api = {
|
||||
},
|
||||
dashboard: {
|
||||
stats: () => request<Stats>('/stats'),
|
||||
sentence: () => request<{ sentence: string }>('/sentence')
|
||||
sentence: () => request<{ sentence: string }>('/sentence'),
|
||||
sendStats: () => request<DailyStats[]>('/sendstats'),
|
||||
taskStats: () => request<TaskStatsItem[]>('/taskstats')
|
||||
},
|
||||
settings: {
|
||||
changePassword: (data: { old_password: string; new_password: string }) =>
|
||||
@@ -289,3 +291,16 @@ export interface LoginLogListResponse {
|
||||
page: number
|
||||
page_size: number
|
||||
}
|
||||
|
||||
export interface DailyStats {
|
||||
day: string
|
||||
total: number
|
||||
success: number
|
||||
failed: number
|
||||
}
|
||||
|
||||
export interface TaskStatsItem {
|
||||
task_id: number
|
||||
task_name: string
|
||||
count: number
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user