TransactionMethodStatusBadge#
- class ansys.solutions.dash_super_components.TransactionMethodStatusBadge(url: str, step_name: str, method_name: str, auto_mode: bool = True, badge_props: dict[str, Any] | None = None, label_props: dict[str, Any] | None = None, interval_props: dict[str, Any] | None = None, aio_id: str | None = None)#
Bases:
DivA Dash component that displays and updates the status of a SAF transaction method.
TransactionMethodStatusBadge is based on the Dash All-in-One (AIO) component pattern. It renders a compact status badge that periodically polls the GLOW API and reflects the current status of the specified method with color-coded states.
Warning
This component requires a SAF-based solution with access to the GLOW API. It must be instantiated inside a callback (not directly in the layout) because it needs the project URL from
DashClient.To activate monitoring from a callback use:
TransactionMethodStatusBadge.ids.activate_monitoring(aio_id) # Store # set "data" to True to activate, False to deactivate
- Parameters:
- url
str The URL of the GLOW API server.
- step_name
str The name of the GLOW step (StepModel) that contains the method.
- method_name
str The name of the GLOW transaction method to monitor.
- auto_mode
bool,optional If
True, monitoring stops automatically when the method reaches a terminal state (completed, failed) and starts automatically when the method is found running when the component is loaded. Default isTrue.- badge_props
dict,optional Additional properties forwarded to the status badge
dmc.Badge.- label_props
dict,optional Additional properties forwarded to the label
html.Divcomponent.- interval_props
dict,optional Additional properties forwarded to the
dcc.Intervalpolling component.- aio_id
str,optional Unique identifier for this component instance. A UUID is generated if not provided.
- url
IDs
- class ansys.solutions.dash_super_components.TransactionMethodStatusBadge.TransactionMethodStatusBadgeIds#
Bases:
AIOIdsProvides IDs for the subcomponents of
TransactionMethodStatusBadge.- classmethod activate_monitoring(aio_id: str | Wildcard) dict[str, Any]#
Return the ID for the activate monitoring component.
This component can be used to externally control the activation of the monitoring.