docs: update documentation to OKF v0.1 format
This commit is contained in:
@@ -53,9 +53,17 @@ shape.
|
||||
# Frontend wiring
|
||||
|
||||
The authenticated shell subscribes to `/api/v1/events/status` from
|
||||
`HomeComponent.ngOnInit()` via `EventStatusStore.start(() => new EventSource('/api/v1/events/status', { withCredentials: true }))`
|
||||
`HomeComponent.ngOnInit()` through `AuthenticatedEventSourceService.open()` and
|
||||
`EventStatusStore.start(...)`
|
||||
(`frontend/src/app/features/home/home.component.ts`,
|
||||
`frontend/src/app/core/services/event-status.store.ts`). The store:
|
||||
`frontend/src/app/core/services/authenticated-event-source.service.ts`,
|
||||
`frontend/src/app/core/services/event-status.store.ts`). The transport uses a
|
||||
fetch stream rather than the browser `EventSource` API because it must attach the
|
||||
JWT `Authorization` header. It sends `Accept: text/event-stream`, includes
|
||||
credentials, parses streamed SSE records, buffers early frames, and aborts the
|
||||
request on `close()`.
|
||||
|
||||
The store:
|
||||
|
||||
1. Calls `applyServerStatus(payload)` on every `message` frame (parses
|
||||
JSON, sets `state`, `serverNowUtc`, `eventStartUtc`, `eventEndUtc`,
|
||||
|
||||
Reference in New Issue
Block a user