Skip to main content

admin_status_feed

Function admin_status_feed 

Source
pub fn admin_status_feed(
    session: Option<AdminSession>,
    pool: &State<DbPool>,
) -> Result<Json<AdminStatusDto>, Status>
Expand description

GET /admin/status.json — the live ops console’s poll feed: the AdminStatusDto as JSON, for the dashboard’s few-second auto-refresh. Cookie-gated (a signed-in AdminSession); an expired session returns 401 so the page simply keeps its last-good values rather than redirecting an XHR. Same-origin only — the agent twin (token-gated, same DTO) is api_status (GET /api/status); the Prometheus gauges are at /metrics.