Improve timestamp handling and event navigation
This commit is contained in:
@@ -6,6 +6,7 @@ from ..cursors import decode, encode
|
||||
from ..db import get_session
|
||||
from ..models import Agent as AgentModel
|
||||
from ..schemas import Agent, AgentsPage
|
||||
from ..timeutil import to_utc
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@@ -15,7 +16,7 @@ def _to_schema(a: AgentModel) -> Agent:
|
||||
agent_id=a.agent_id,
|
||||
hostname=a.hostname,
|
||||
status=a.status,
|
||||
last_seen_at=a.last_seen_at,
|
||||
last_seen_at=to_utc(a.last_seen_at),
|
||||
features=a.features or {"push": False, "metrics": False},
|
||||
labels=a.labels or {},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user