helpers ¶
Helper utilities for config dashboard.
Provides common UI building patterns, error handling, and utility functions to reduce duplication across dashboard modes.
Functions:
-
create_back_button–Create a standardized "Back to Dashboard" button.
-
create_error_container–Create a standardized error container with back button.
-
add_back_button_to_container–Add a back button to a container.
Classes¶
Functions¶
create_back_button ¶
Python
create_back_button(dashboard: ConfigDashboard) -> Button[LayoutView]
Create a standardized "Back to Dashboard" button.
Parameters:
-
dashboard(ConfigDashboard) –The dashboard instance to attach the callback to
Returns:
-
Button[LayoutView]–Configured back button
create_error_container ¶
Python
create_error_container(
error_message: str, dashboard: ConfigDashboard
) -> Container[LayoutView]
Create a standardized error container with back button.
Parameters:
-
error_message(str) –Error message to display
-
dashboard(ConfigDashboard) –Dashboard instance for callback
Returns:
-
Container[LayoutView]–Error container with message and back button
add_back_button_to_container ¶
Python
add_back_button_to_container(
container: Container[LayoutView], dashboard: ConfigDashboard
) -> None
Add a back button to a container.
Parameters:
-
container(Container[LayoutView]) –Container to add button to
-
dashboard(ConfigDashboard) –Dashboard instance for callback