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
|
Compute the rendered props for the panel. |
|
Build the inline result panel. |
Classes
|
One result rendered in the panel. |
- class exlab_wizard.ui.components.test_connection_panel.TestConnectionResult(success, headline, detail, raw)[source]#
Bases:
objectOne result rendered in the panel.
- 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.
- 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:
result (
TestConnectionResult|None)stale (
bool)
- Return type: