Skip to content

Commit

Permalink
Refine workflow step title display in run form.
Browse files Browse the repository at this point in the history
- Go back to prefixing with the step number as discussed on #3369.
- Use the label regardless of step type - don't ignore tool labels.
  • Loading branch information
jmchilton committed Dec 28, 2016
1 parent d84221e commit bcd660c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/galaxy/managers/workflows.py
Expand Up @@ -378,6 +378,10 @@ def _workflow_to_dict_run( self, trans, stored ):
step_models = []
for i, step in enumerate( workflow.steps ):
step_model = None

def step_title(step, default_name):
return "%d: %s" % (step.order_index + 1, step.label or default_name)

if step.type == 'tool':
incoming = {}
tool = trans.app.toolbox.get_tool( step.tool_id )
Expand All @@ -389,12 +393,12 @@ def _workflow_to_dict_run( self, trans, stored ):
'output_name' : pja.output_name,
'action_arguments' : pja.action_arguments
} for pja in step.post_job_actions ]
step_model["name"] = step_title(step, step_model.get("name"))
else:
inputs = step.module.get_runtime_inputs( connections=step.output_connections )
label = step.module.label or step.module.name
step_model = {
'name' : label,
'inputs' : [ input.to_dict( trans ) for input in inputs.itervalues() ]
'name' : step_title(step, step.module.name),
'inputs' : [ input.to_dict( trans ) for input in inputs.itervalues() ]
}
step_model[ 'step_type' ] = step.type
step_model[ 'step_index' ] = step.order_index
Expand Down

0 comments on commit bcd660c

Please sign in to comment.