feat: Dashboard MVP with summary API and UI

Add GET /api/v1/dashboards/summary (24h events, open problems,
hosts, severity breakdown, recent events) and Vue /dashboard page.
This commit is contained in:
2026-05-27 12:37:06 +10:00
parent eeba3a704d
commit ea221db3c7
8 changed files with 214 additions and 6 deletions
+8
View File
@@ -112,3 +112,11 @@ export async function ackProblem(problemId: number): Promise<{ id: number; statu
export async function resolveProblem(problemId: number): Promise<{ id: number; status: string }> {
return apiFetch(`/api/v1/problems/${problemId}/resolve`, { method: "POST" });
}
export interface DashboardSummary {
events_last_24h: number;
hosts_total: number;
problems_open: number;
severity_24h: Record<string, number>;
recent_events: EventSummary[];
}