feat: SAC 0.7.0 display_name columns and event severity overrides
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from app.models.event import Event
|
||||
from app.schemas.list_models import EventSummary
|
||||
|
||||
|
||||
def event_to_summary(event: Event) -> EventSummary:
|
||||
host = event.host
|
||||
return EventSummary(
|
||||
id=event.id,
|
||||
event_id=event.event_id,
|
||||
host_id=event.host_id,
|
||||
hostname=host.hostname,
|
||||
display_name=host.display_name,
|
||||
occurred_at=event.occurred_at,
|
||||
received_at=event.received_at,
|
||||
category=event.category,
|
||||
type=event.type,
|
||||
severity=event.severity,
|
||||
title=event.title,
|
||||
summary=event.summary,
|
||||
)
|
||||
Reference in New Issue
Block a user