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:
Fringg
2026-02-08 22:52:14 +03:00
parent 5678dfd558
commit ab0270ac58
9 changed files with 107 additions and 1 deletions

View File

@@ -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');