feat: Add database stats tab to admin dashboard with PostgreSQL support
This commit is contained in:
@@ -876,6 +876,18 @@ export interface AdminSystemHealth {
|
||||
tasks_last_1h: number;
|
||||
failures_last_1h: number;
|
||||
database_size_mb: number;
|
||||
database_type: string;
|
||||
}
|
||||
|
||||
export interface DatabaseStats {
|
||||
database_type: string;
|
||||
tables: Array<{
|
||||
table_name: string;
|
||||
row_count: number;
|
||||
total_size_kb?: number;
|
||||
data_size_kb?: number;
|
||||
}>;
|
||||
table_count: number;
|
||||
}
|
||||
|
||||
export async function getAdminRatingsDetail(page = 1, perPage = 20, tool = ''): Promise<AdminRatingsDetail> {
|
||||
@@ -905,6 +917,11 @@ export async function getAdminSystemHealth(): Promise<AdminSystemHealth> {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function getDatabaseStats(): Promise<DatabaseStats> {
|
||||
const response = await api.get<DatabaseStats>('/internal/admin/database-stats');
|
||||
return response.data;
|
||||
}
|
||||
|
||||
// --- Account / Usage / API Keys ---
|
||||
|
||||
export interface UsageSummary {
|
||||
|
||||
Reference in New Issue
Block a user