feat: add superadmin health center

This commit is contained in:
2026-01-17 09:18:05 +08:00
parent 94a10a3af0
commit 4f2b8ea3ad
14 changed files with 870 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
import { requestJson } from './apiClient';
export const HealthService = {
async getOverview({ tenant_id, start_at, end_at, upload_stuck_hours } = {}) {
const iso = (d) => {
if (!d) return undefined;
const date = d instanceof Date ? d : new Date(d);
if (Number.isNaN(date.getTime())) return undefined;
return date.toISOString();
};
const query = {
tenant_id,
start_at: iso(start_at),
end_at: iso(end_at),
upload_stuck_hours
};
return requestJson('/super/v1/health/overview', { query });
}
};