Skip to content

Commit

Permalink
Translate waiting workflow state to running
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Jan 13, 2025
1 parent f80ae9a commit 1329722
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/aiidalab_qe/common/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ class ResultsModel(PanelModel, HasProcess):
"excepted": "danger",
"killed": "danger",
"queued": "warning",
"waiting": "info",
"running": "info",
"created": "info",
}
Expand Down Expand Up @@ -556,6 +555,8 @@ def fetch_child_process_node(self, which="this") -> orm.ProcessNode | None:

def _get_child_process_status(self, which="this"):
state, exit_message = self._get_child_state_and_exit_message(which)
if state == "waiting":
state = "running"
status = state.upper()
if exit_message:
status = f"{status} ({exit_message})"
Expand Down Expand Up @@ -627,6 +628,8 @@ def render(self):
else:
self._render_controls()
self.children += (self.results_container,)
if self._model.identifier == "structure":
self._load_results()

def _on_process_change(self, _):
self._model.update()
Expand Down Expand Up @@ -666,7 +669,7 @@ def _render_controls(self):

self.load_controls = ipw.HBox(
children=[]
if self._model.auto_render
if self._model.auto_render or self._model.identifier == "structure"
else [
self.load_results_button,
ipw.HTML("""
Expand Down

0 comments on commit 1329722

Please sign in to comment.