feat: UI Problems list filters, detail card and event timeline (d2-1)
- Filters status/severity/hostname; /problems/:id with Ack/Resolve and timeline - Dashboard drill-down to open problems Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -111,6 +111,24 @@ export interface ProblemListResponse {
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
export interface ProblemEventItem {
|
||||
id: number;
|
||||
event_id: string;
|
||||
occurred_at: string;
|
||||
type: string;
|
||||
severity: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
}
|
||||
|
||||
export interface ProblemDetail extends ProblemSummary {
|
||||
events: ProblemEventItem[];
|
||||
}
|
||||
|
||||
export function fetchProblem(id: number): Promise<ProblemDetail> {
|
||||
return apiFetch<ProblemDetail>(`/api/v1/problems/${id}`);
|
||||
}
|
||||
|
||||
export async function ackProblem(problemId: number): Promise<{ id: number; status: string }> {
|
||||
return apiFetch(`/api/v1/problems/${problemId}/ack`, { method: "POST" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user