<% _=n_ %> <%def name="history_item( data, creator_disabled=False )"> %if data.state in [ "no state", "", None ]: <% data_state = "queued" %> %else: <% data_state = data.state %> %endif <% encoded_id = trans.app.security.encode_id( data.id ) %>
${data.hid} ${data.display_name()}
%if disabled: %endif
<%def name="render_msg( msg, status='done' )"> <% from galaxy.util.sanitize_html import sanitize_html if status == "done": status = "success" elif status == "error": status = "danger" if status not in ("danger", "info", "success", "warning"): status = "info" %>
${sanitize_html(msg)}
OMAP - Extract workflow from history ${ h.dist_css('base') } ${ h.css('history') }

The following list contains each tool that was run to create the datasets in your current history. Please select those that you wish to include in the workflow.

Tools which cannot be run interactively and thus cannot be incorporated into a workflow will be shown in gray.

%for warning in warnings:
${warning}
%endfor

%for job, datasets in jobs.items(): <% cls = "toolForm" tool_name = "Unknown" checked_job = "checked" if any(True for d in datasets if not d[1].deleted) else "" if hasattr( job, 'is_fake' ) and job.is_fake: cls += " toolFormDisabled" disabled = True tool_name = getattr( job, 'name', tool_name ) else: tool = app.toolbox.get_tool( job.tool_id, tool_version=job.tool_version ) if tool: tool_name = tool.name if tool is None or not( tool.is_workflow_compatible ): cls += " toolFormDisabled" disabled = True else: disabled = False if tool and tool.version != job.tool_version: tool_version_warning = 'Dataset was created with tool version "%s", but workflow extraction will use version "%s".' % ( job.tool_version, tool.version ) else: tool_version_warning = '' if disabled: disabled_why = getattr( job, 'disabled_why', "This tool cannot be used in workflows" ) %> %endfor
Tool History items created
${tool_name}
<% encoded_job_id = trans.app.security.encode_id(job.id) %> %if disabled:
${disabled_why}
%else:
Include "${tool_name}" in workflow
%if not checked_job: ${ render_msg( "All job outputs have been deleted", status="info" ) } %endif %if tool_version_warning: ${ render_msg( tool_version_warning, status="warning" ) } %endif %endif
%for _, data in datasets:
${history_item( data, disabled )}
%endfor