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: Div

A 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:
urlstr

The URL of the GLOW API server.

step_namestr

The name of the GLOW step (StepModel) that contains the method.

method_namestr

The name of the GLOW transaction method to monitor.

auto_modebool, 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 is True.

badge_propsdict, optional

Additional properties forwarded to the status badge dmc.Badge.

label_propsdict, optional

Additional properties forwarded to the label html.Div component.

interval_propsdict, optional

Additional properties forwarded to the dcc.Interval polling component.

aio_idstr, optional

Unique identifier for this component instance. A UUID is generated if not provided.

IDs

class ansys.solutions.dash_super_components.TransactionMethodStatusBadge.TransactionMethodStatusBadgeIds#

Bases: AIOIds

Provides 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.

Parameters:
aio_idstr or _Wildcard

The component’s unique identifier.

Returns:
dict[str, Any]

The unique ID dictionary for the activate monitoring subcomponent.

classmethod label(aio_id: str | Wildcard) → dict[str, Any]#

Return the ID for the label component.

Parameters:
aio_idstr or _Wildcard

The component’s unique identifier.

Returns:
dict[str, Any]

The unique ID dictionary for the label subcomponent.

classmethod status_badge(aio_id: str | Wildcard) → dict[str, Any]#

Return the ID for the status badge component.

Parameters:
aio_idstr or _Wildcard

The component’s unique identifier.

Returns:
dict[str, Any]

The unique ID dictionary for the status badge subcomponent.