feat: Problems API, ingest hook, and UI

This commit is contained in:
2026-05-27 11:24:19 +10:00
parent b19cdf2b47
commit 5fce00faae
14 changed files with 451 additions and 10 deletions
+28
View File
@@ -84,3 +84,31 @@ export interface HostListResponse {
page: number;
page_size: number;
}
export interface ProblemSummary {
id: number;
host_id: number | null;
hostname: string | null;
title: string;
summary: string;
severity: string;
status: string;
rule_id: string | null;
created_at: string;
updated_at: string;
}
export interface ProblemListResponse {
items: ProblemSummary[];
total: number;
page: number;
page_size: number;
}
export async function ackProblem(problemId: number): Promise<{ id: number; status: string }> {
return apiFetch(`/api/v1/problems/${problemId}/ack`, { method: "POST" });
}
export async function resolveProblem(problemId: number): Promise<{ id: number; status: string }> {
return apiFetch(`/api/v1/problems/${problemId}/resolve`, { method: "POST" });
}