From 3c52f8d2ae210c12a1f1b4d9b28d8b52b72e9089 Mon Sep 17 00:00:00 2001 From: AnandSundar Date: Mon, 22 Jun 2026 13:36:37 -0600 Subject: [PATCH] feat(ui): snooze controls in alert center Wires the Alert Center to the new per-alert snooze endpoints and renders the new server-side fields (snoozedUntil, lastEvaluatedAt). - TriggeredAlert interface extended with status union members ('snoozed' | 'auto_resolved') and the four new fields. - acApi gains snooze(id, durationHours) and unsnooze(id). - statusTone maps the new statuses to neutral (snoozed) and info (auto_resolved) tones so they read distinctly from new / acknowledged. - Status filter dropdown gets two new options so users can isolate snoozed or auto-resolved rows. - Action cell gains a snooze ({ Policy:a.policyName, Severity:a.severity, Category:a.category, Condition:a.condition, MetricValue:a.metricValue, Threshold:a.threshold, Triggered:a.triggeredAt, Status:a.status }))} filename="triggered-alerts.csv"/> @@ -4007,10 +4036,29 @@ function AlertCenterPage({ policies, triggeredAlerts, onChanged }: { {a.metricValue} {a.threshold} {relTime(a.triggeredAt)} - - e.stopPropagation()} style={{ display:"flex", gap:4, alignItems:"center" }}> + + {a.snoozedUntil && new Date(a.snoozedUntil) > new Date() && ( +
snoozed until {relTime(a.snoozedUntil)}
+ )} + + e.stopPropagation()} style={{ display:"flex", gap:4, alignItems:"center", flexWrap:"wrap" }}> {a.status === "new" && } - {a.status !== "resolved" && } + {a.status !== "resolved" && a.status !== "auto_resolved" && ( + + )} + {a.snoozedUntil && new Date(a.snoozedUntil) > new Date() && ( + + )} + {a.status !== "resolved" && a.status !== "auto_resolved" && } ))}