duck.etc.blueprints.dashboard.ui.pages.dashboard¶
DashboardPage — the root page for the Duck Framework server dashboard.
Wires all dashboard components together and drives live data refresh via Lively WebSocket event bindings. Requires a valid JWT session — unauthenticated requests are routed to LoginPage by the view layer.
Module Contents¶
Classes¶
Full-page server dashboard driven by Lively reactive updates. |
API¶
- class duck.etc.blueprints.dashboard.ui.pages.dashboard.DashboardPage(request, disable_lively: bool = False, lazy: bool = True, *args, **kwargs)[source]¶
Bases:
duck.html.components.page.PageFull-page server dashboard driven by Lively reactive updates.
Fetches a complete data snapshot on initial load and on every refresh triggered by the topbar button. All panels re-render in-place without a full page reload. Requires JWT authentication — handled by the view layer before this page is instantiated.
Initialization
Initialize the Page component.
- Parameters:
request – The target HTTP request.
disable_lively – This disables
Livelycomponents for the page. Defaults to False.lazy – This makes the page not aggressively load the page tree on initialization but let the system decide the right time to load the page. Defaults to True.
- build_layout(snapshot: dict, sys_snapshot: dict) None[source]¶
Constructs the full page layout from the provided data snapshots.
- Parameters:
snapshot – Dict returned by services.get_full_snapshot().
sys_snapshot – Dict returned by system_metrics.get_system_metrics().
- build_main_content() duck.html.components.container.Container[source]¶
Returns the scrollable main content area with all panel rows.
- Returns:
A Container holding all panel rows inside db-main.
- format_ts() str[source]¶
Returns the current UTC time formatted as a display string.
- Returns:
32:07 UTC”.
- Return type:
A string like “Updated 14