Loading src/nova/trame/view/components/execution_buttons.py +25 −22 Original line number Diff line number Diff line """Module for the Progress Tab.""" from typing import Tuple, Union from trame.app import get_server from trame.widgets import client from trame.widgets import vuetify3 as vuetify Loading @@ -15,16 +17,17 @@ class ExecutionButtons: This is intended to be used with the `nova-galaxy ToolRunner <https://nova-application-development.readthedocs.io/projects/nova-galaxy/en/latest/core_concepts/tool_runner.html>`__. """ def __init__(self, id: str, stop_btn: bool = False, download_btn: bool = False) -> None: def __init__(self, id: str, stop_btn: Union[bool, Tuple] = False, download_btn: Union[bool, Tuple] = False) -> None: """Constructor for ExecutionButtons. Parameters ---------- id : str Component id. Should be used consistently with ToolRunner and other components. stop_btn: bool Component id. Should be used consistently with ToolRunner and other components. Note that this parameter does not support Trame bindings. stop_btn: Union[bool, Tuple] Display stop button. download_btn : bool download_btn : Union[bool, Tuple] Display download button. Returns Loading Loading @@ -68,9 +71,9 @@ class ExecutionButtons: id=f"{self.id}_run", click=self.run, ) if self.stop_btn: vuetify.VBtn( "Stop", v_if=self.stop_btn, disabled=(f"{self.id}.stop_disabled",), loading=(f"{self.id}.stop_in_progress",), classes="mr-4", Loading @@ -88,9 +91,9 @@ class ExecutionButtons: id=f"{self.id}_cancel", click=self.cancel, ) if self.download_btn: vuetify.VBtn( "Download Results", v_if=self.download_btn, disabled=(f"{self.id}.download_disabled",), loading=(f"{self.id}.download_in_progress",), id=f"{self.id}.download", Loading Loading
src/nova/trame/view/components/execution_buttons.py +25 −22 Original line number Diff line number Diff line """Module for the Progress Tab.""" from typing import Tuple, Union from trame.app import get_server from trame.widgets import client from trame.widgets import vuetify3 as vuetify Loading @@ -15,16 +17,17 @@ class ExecutionButtons: This is intended to be used with the `nova-galaxy ToolRunner <https://nova-application-development.readthedocs.io/projects/nova-galaxy/en/latest/core_concepts/tool_runner.html>`__. """ def __init__(self, id: str, stop_btn: bool = False, download_btn: bool = False) -> None: def __init__(self, id: str, stop_btn: Union[bool, Tuple] = False, download_btn: Union[bool, Tuple] = False) -> None: """Constructor for ExecutionButtons. Parameters ---------- id : str Component id. Should be used consistently with ToolRunner and other components. stop_btn: bool Component id. Should be used consistently with ToolRunner and other components. Note that this parameter does not support Trame bindings. stop_btn: Union[bool, Tuple] Display stop button. download_btn : bool download_btn : Union[bool, Tuple] Display download button. Returns Loading Loading @@ -68,9 +71,9 @@ class ExecutionButtons: id=f"{self.id}_run", click=self.run, ) if self.stop_btn: vuetify.VBtn( "Stop", v_if=self.stop_btn, disabled=(f"{self.id}.stop_disabled",), loading=(f"{self.id}.stop_in_progress",), classes="mr-4", Loading @@ -88,9 +91,9 @@ class ExecutionButtons: id=f"{self.id}_cancel", click=self.cancel, ) if self.download_btn: vuetify.VBtn( "Download Results", v_if=self.download_btn, disabled=(f"{self.id}.download_disabled",), loading=(f"{self.id}.download_in_progress",), id=f"{self.id}.download", Loading