exlab_wizard.ui.components.test_connection_panel#

Test-connection result panel (Frontend Spec §7.4.2).

A persistent inline panel below the Settings dialog’s [Test connection] button. Shape:

  • Result icon + headline“Connected” (green check) or “Connection failed” (red X).

  • Detail line – one-line context (latency on success; reason on failure).

  • Show details disclosure – collapsed by default; expanded shows the full underlying response in a monospaced block.

The panel persists until the next test or until any field in the same section is edited; on edit, mark_stale() flips a flag that the caller renders as “(may be stale; re-test to confirm)”.

Functions

panel_props(result, *[, stale])

Compute the rendered props for the panel.

test_connection_panel([result, stale])

Build the inline result panel.

Classes

TestConnectionResult(success, headline, ...)

One result rendered in the panel.

class exlab_wizard.ui.components.test_connection_panel.TestConnectionResult(success, headline, detail, raw)[source]#

Bases: object

One result rendered in the panel.

Parameters:
detail: str#
headline: str#
raw: str#
success: bool#
exlab_wizard.ui.components.test_connection_panel.panel_props(result, *, stale=False)[source]#

Compute the rendered props for the panel.

Returns a dict suitable for asserting in tests; the NiceGUI factory consumes the same dict.

Parameters:
Return type:

dict[str, Any]

exlab_wizard.ui.components.test_connection_panel.test_connection_panel(result=None, *, stale=False)[source]#

Build the inline result panel.

Returns a NiceGUI element, or the props dict when called outside of a NiceGUI app context.

Parameters:
Return type:

Any