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:
2026-06-20 17:27:41 +10:00
parent a35e50ccd1
commit 01d72d0f68
15 changed files with 249 additions and 17 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ def fetch_recent_events(db: Session, *, limit: int = 8) -> list[EventSummary]:
.order_by(Event.received_at.desc())
.limit(limit)
).all()
return [event_to_summary(e) for e in rows]
return [event_to_summary(e, db) for e in rows]
class TopHostItem(BaseModel):
+2 -2
View File
@@ -170,7 +170,7 @@ def list_events(
.limit(page_size)
).all()
items = [event_to_summary(e) for e in rows]
items = [event_to_summary(e, db) for e in rows]
return EventListResponse(items=items, total=total, page=page, page_size=page_size)
@@ -266,7 +266,7 @@ def get_event(
)
if event is None:
raise HTTPException(status_code=404, detail="Event not found")
base = event_to_summary(event)
base = event_to_summary(event, db)
return EventDetail(
**base.model_dump(),
details=event.details,