exlab_wizard.ui.pages.staging#
Orchestrator staging panel (Frontend Spec §3.9, Backend §13.8).
A bottom-dock panel rendered below the main content when orchestrator mode is enabled. The panel is ~120 px tall, non-collapsible, and always visible while the orchestrator is active so the operator sees pending staging activity without an extra navigation step.
Each row shows:
Per-row actions:
[Force sync]– POST /staging/{run_path}/force-sync.[Clear]– POST /staging/{run_path}/clear (only enabled forsync_verifiedruns).[View log]– open the run’s wizard.<hostname>.log in the detail pane.
A toolbar action [Clear verified runs] clears every run currently
in sync_verified. The row data is supplied by the caller as a list
of StagedRunSummary from
exlab_wizard.orchestrator.staging_query.list_staged_runs().
Module Attributes
~120 px, non-collapsible bottom dock. |
|
The seven columns displayed (column order is part of the spec). |
Functions
|
Render |
|
Render |
|
Render the bottom-dock staging panel. |
|
Render-ready dict for one table row. |
|
Static badge props for a staging-state pill. |
Classes
|
Render state for the staging panel. |
- exlab_wizard.ui.pages.staging.STAGING_DOCK_HEIGHT_PX: int = 120#
~120 px, non-collapsible bottom dock.
- Type:
Per the brief
- exlab_wizard.ui.pages.staging.STAGING_TABLE_COLUMNS: tuple[str, ...] = ('State', 'Run', 'Equipment', 'Files', 'Bytes', 'Elapsed', 'Actions')#
The seven columns displayed (column order is part of the spec).
- class exlab_wizard.ui.pages.staging.StagingDockState(rows, on_force_sync=None, on_clear=None, on_view_log=None, on_clear_verified=None)[source]#
Bases:
objectRender state for the staging panel.
rowsis the list of staging rows pulled from the API; the callbacks are invoked when the operator clicks the row / toolbar buttons. Pages mutaterowsin-place when refreshing.- Parameters:
- rows: list[StagedRunSummary]#
- exlab_wizard.ui.pages.staging.format_bytes(value)[source]#
Render
valueas a binary unit string (KiB / MiB / …).Returns a compact string suitable for table cells. The output uses the same notation across the codebase (see
ui/components/tree.py) so the column reads consistently with the rest of the app.
- exlab_wizard.ui.pages.staging.format_elapsed(seconds)[source]#
Render
secondsas a compact “Hh Mm Ss” / “Mm Ss” / “Ss” string.
- exlab_wizard.ui.pages.staging.render_staging_dock(state)[source]#
Render the bottom-dock staging panel.
Returns the NiceGUI element when the framework is importable (the common runtime case), or a plain dict describing the rendered shape when NiceGUI is unavailable (the unit-test path – avoids forcing a headless Chromium just to check column ordering).
- Parameters:
state (
StagingDockState)- Return type:
- exlab_wizard.ui.pages.staging.row_props(row)[source]#
Render-ready dict for one table row.
Exposed for unit tests so the pure formatters can be asserted without instantiating NiceGUI elements.
- Parameters:
row (
StagedRunSummary)- Return type:
- exlab_wizard.ui.pages.staging.state_pill_props(state)[source]#
Static badge props for a staging-state pill.
Returns
{label, color, background}so the renderer can build the badge without re-deriving colors.colordefaults to the muted text token for unrecognised states (defensive – the Pydantic Literal already constrains the values).