-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign status and results step (#978)
This PR redesigns step 4 as follows: - Split step into three "tabs": - Parameters summary and data download controls - Result panels - Process status views - "simplified" view (to be implemented in a later PR), and - "advanced" view (the current process tree) - Smoothly handle transition from submission to results - the app now proceeds to step 4 while the builder is created and submitted. Step 4 is updated once the process is ready (Submit button doesn't get immediately disabled and it might take 2-3 seconds to go to next step #994) - Also resolves the issue where the submit button can be repeatedly pressed - Discard redundant "Update results" button - Disable raw-data/archive download buttons when downloading (Disable download button when clicked, until the download starts #977) - Inject process pk to url on submission (Change URL when calc is submitted (and PK is assigned) #990)
- Loading branch information
1 parent
9e2f4b5
commit aad3410
Showing
40 changed files
with
605 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import typing as t | ||
|
||
import ipywidgets as ipw | ||
|
||
from aiidalab_qe.common.mixins import HasProcess | ||
from aiidalab_qe.common.mvc import Model | ||
from aiidalab_qe.common.widgets import LoadingWidget | ||
|
||
|
||
class ResultsComponentModel(Model, HasProcess): | ||
identifier = "results" | ||
|
||
|
||
RCM = t.TypeVar("RCM", bound=ResultsComponentModel) | ||
|
||
|
||
class ResultsComponent(ipw.VBox, t.Generic[RCM]): | ||
def __init__(self, model: RCM, **kwargs): | ||
self.loading_message = LoadingWidget(f"Loading {model.identifier}") | ||
|
||
super().__init__( | ||
children=[self.loading_message], | ||
**kwargs, | ||
) | ||
|
||
self._model = model | ||
self._model.observe( | ||
self._on_process_change, | ||
"process_uuid", | ||
) | ||
self._model.observe( | ||
self._on_monitor_counter_change, | ||
"monitor_counter", | ||
) | ||
|
||
self.rendered = False | ||
|
||
def render(self): | ||
if self.rendered: | ||
return | ||
self._render() | ||
self.rendered = True | ||
self._post_render() | ||
|
||
def _on_process_change(self, _): | ||
pass | ||
|
||
def _on_monitor_counter_change(self, _): | ||
pass | ||
|
||
def _render(self): | ||
raise NotImplementedError | ||
|
||
def _post_render(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from .model import WorkChainStatusModel | ||
from .status import WorkChainStatusPanel | ||
|
||
__all__ = [ | ||
"WorkChainStatusModel", | ||
"WorkChainStatusPanel", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from aiidalab_qe.app.result.components import ResultsComponentModel | ||
|
||
|
||
class WorkChainStatusModel(ResultsComponentModel): | ||
identifier = "workflow process status monitors" |
Oops, something went wrong.