mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
feat: add system info card to admin dashboard
Shows cabinet version, bot version, Python version, uptime, users and active subscriptions at the bottom of the dashboard page.
This commit is contained in:
@@ -308,9 +308,23 @@ export interface RecentPaymentsResponse {
|
||||
total_week_kopeks: number;
|
||||
}
|
||||
|
||||
export interface SystemInfo {
|
||||
bot_version: string;
|
||||
python_version: string;
|
||||
uptime_seconds: number;
|
||||
users_total: number;
|
||||
subscriptions_active: number;
|
||||
}
|
||||
|
||||
// ============ Dashboard Stats API ============
|
||||
|
||||
export const statsApi = {
|
||||
// Get system info
|
||||
getSystemInfo: async (): Promise<SystemInfo> => {
|
||||
const response = await apiClient.get('/cabinet/admin/stats/system-info');
|
||||
return response.data;
|
||||
},
|
||||
|
||||
// Get complete dashboard stats
|
||||
getDashboardStats: async (): Promise<DashboardStats> => {
|
||||
const response = await apiClient.get('/cabinet/admin/stats/dashboard');
|
||||
|
||||
Reference in New Issue
Block a user