exlab_wizard.ui.components.operations_modal#

In-flight operations panel (Frontend Spec §9.5).

A modal reachable from the Sync segment of the bottom status bar (when any session is suspended in INPUT_REQUIRED) and from a toolbar [Operations...] button. Backed by GET /api/v1/operations (Backend §4.6.1).

Functions

operation_columns()

Column definitions for the NiceGUI table (Frontend §9.5).

operations_modal(rows, *, on_resume, ...)

Build the operations modal.

sort_rows(rows)

Suspended rows first (oldest first), then running, then completed.

state_glyph(state)

Map an operation state to its NiceGUI icon name.

Classes

OperationRow(operation_id, state, ...[, plugin])

A single row in the operations panel.

class exlab_wizard.ui.components.operations_modal.OperationRow(operation_id, state, started_at, equipment, project, run, plugin=None)[source]#

Bases: object

A single row in the operations panel.

Parameters:
equipment: str#
classmethod from_session(session_id, session)[source]#

Map a controller Session to a panel row.

Collapses the §4.7 state machine onto the panel’s three buckets: INPUT_REQUIRED -> suspended (offers Resume/Cancel), DONE -> completed, every other non-terminal state -> running. Shares project_identifier with the /operations route so both label rows identically (imported lazily to respect the controller/api import ordering).

Parameters:
  • session_id (str)

  • session (Any)

Return type:

OperationRow

operation_id: str#
plugin: str | None = None#
project: str#
run: str#
started_at: str#
state: str#
exlab_wizard.ui.components.operations_modal.operation_columns()[source]#

Column definitions for the NiceGUI table (Frontend §9.5).

Return type:

list[dict[str, Any]]

exlab_wizard.ui.components.operations_modal.operations_modal(rows, *, on_resume, on_cancel, on_view_log)[source]#

Build the operations modal.

Parameters:
Return type:

Any

exlab_wizard.ui.components.operations_modal.sort_rows(rows)[source]#

Suspended rows first (oldest first), then running, then completed.

Per Frontend §9.5: suspended-row default-sort is by Started-at oldest first so the operator clears the longest-pending input first.

Parameters:

rows (list[OperationRow])

Return type:

list[OperationRow]

exlab_wizard.ui.components.operations_modal.state_glyph(state)[source]#

Map an operation state to its NiceGUI icon name.

Parameters:

state (str)

Return type:

str