fix: show RDG flap badge on 302 and 303 events in SAC UI (0.20.5)
Seaca surfaced flap via Problems; the web UI only flagged 303 in DB and had no visible label. Resolve flap pairs at read time and show badge plus qwinsta on both sides of 302→303.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { EventSummary } from "../api";
|
||||
|
||||
export function hasRdgFlapUi(event: EventSummary): boolean {
|
||||
return Boolean(event.rdg_flap || event.rdg_flap_qwinsta_event_id);
|
||||
}
|
||||
|
||||
export function rdgFlapQwinstaEventId(event: EventSummary): number | null {
|
||||
if (event.rdg_flap_qwinsta_event_id) return event.rdg_flap_qwinsta_event_id;
|
||||
return event.rdg_flap ? event.id : null;
|
||||
}
|
||||
|
||||
export function rdgFlapPairLabel(event: EventSummary): string {
|
||||
if (!event.rdg_flap_pair_event_id) return "";
|
||||
return event.type === "rdg.connection.success" ? "→" : "←";
|
||||
}
|
||||
Reference in New Issue
Block a user