@@ -254,12 +254,14 @@ def __init__(
254254 self ,
255255 invocation_id : str ,
256256 display_configuration : Optional [DisplayConfiguration ] = None ,
257+ galaxy_url : Optional [str ] = None ,
257258 ):
258259 self .subworkflow_invocation_ids_seen : Set [str ] = set ()
259260 self .subworkflow_invocation_ids_completed : Set [str ] = set ()
260261 self .subworkflow_invocation_id : Optional [str ] = None
261262 self .invocation_id = invocation_id
262263 display = display_configuration or DisplayConfiguration ()
264+ self .galaxy_url = galaxy_url
263265 self .display = display
264266 self .workflow_progress = WorkflowProgress (display )
265267 self .subworkflow_progress = WorkflowProgress (display )
@@ -287,14 +289,20 @@ def an_incomplete_subworkflow_id(self):
287289 def all_subworkflows_complete (self ):
288290 return len (self .subworkflow_invocation_ids_seen ) == len (self .subworkflow_invocation_ids_completed )
289291
292+ def get_invocation_ui_link (self ):
293+ if self .galaxy_url :
294+ return f"{ self .galaxy_url } /workflows/invocations/{ self .invocation_id } "
295+ else :
296+ return None
297+
290298 def _panel (self ):
291299 def job_states (workflow_progress ):
292300 if self .display .include_job_state_breakdown :
293301 return workflow_progress ._job_states_console_line ()
294302 else :
295303 return None
296304
297- title = f"[{ self .display .style_header } ]{ self .display .label_header_prefix } <{ self .invocation_id } >"
305+ title = f"[{ self .display .style_header } ]{ self .display .label_header_prefix } <[link= { self .get_invocation_ui_link () } ] { self . invocation_id } [/link] >"
298306 subworkflow_title = None
299307 if self .subworkflow_invocation_id :
300308 subworkflow_title = f"[{ self .display .style_subworkflow_header } ]{ self .display .label_subworkflow_header_prefix } <{ self .subworkflow_invocation_id } >"
0 commit comments