X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1c4506929f883a25240e5cbc0a5e55597b9ddb1b..e24a892b920fd8cddf091a3c15acba1ab27f510d:/apps/workbench/app/views/container_requests/_show_inputs.html.erb?ds=sidebyside diff --git a/apps/workbench/app/views/container_requests/_show_inputs.html.erb b/apps/workbench/app/views/container_requests/_show_inputs.html.erb index 87b36c142e..b2fb245454 100644 --- a/apps/workbench/app/views/container_requests/_show_inputs.html.erb +++ b/apps/workbench/app/views/container_requests/_show_inputs.html.erb @@ -1,40 +1,49 @@ -<% n_inputs = cwl_inputs_required(@object, @object.mounts[:"/var/lib/cwl/workflow.json"][:content][:inputs], [:mounts, :"/var/lib/cwl/cwl.input.json", :content]) %> +<% +n_inputs = if @object.mounts[:"/var/lib/cwl/workflow.json"] && @object.mounts[:"/var/lib/cwl/cwl.input.json"] + cwl_inputs_required(@object, get_cwl_inputs(@object.mounts[:"/var/lib/cwl/workflow.json"][:content]), [:mounts, :"/var/lib/cwl/cwl.input.json", :content]) + else + 0 + end +%> <% content_for :pi_input_form do %>
- <% workflow = @object.mounts[:"/var/lib/cwl/workflow.json"][:content] %> - <% workflow[:inputs].each do |input| %> - -
-

- <%= render_cwl_input @object, input, [:mounts, :"/var/lib/cwl/cwl.input.json", :content] %> + <% workflow = @object.mounts[:"/var/lib/cwl/workflow.json"].andand[:content] %> + <% if workflow %> + <% inputs = get_cwl_inputs(workflow) %> + <% inputs.each do |input| %> + +

+

+ <%= render_cwl_input @object, input, [:mounts, :"/var/lib/cwl/cwl.input.json", :content] %> +

+
+

+ <%= input[:doc] %>

-
-

- <%= input[:doc] %> -

+ <% end %> <% end %>
<% end %> <% if n_inputs == 0 %> -

This workflow does not need any further inputs specified. You can start it by clicking the "Run" button whenever you're ready. (It's not too late to change the settings, though.)

+

This workflow does not need any further inputs specified. Click the "Run" button at the bottom of the page to start the workflow.

<% else %> - <%= render_unreadable_inputs_present %> -

Provide <%= n_inputs > 1 ? 'values' : 'a value' %> for the following <%= n_inputs > 1 ? 'parameters' : 'parameter' %>, then click the "Run" button to start the workflow.

- <% if @object.editable? %> - <%= content_for :pi_input_form %> - <%= link_to(url_for('container_request[state]' => 'Committed'), - class: 'btn btn-primary run-pipeline-button', - method: :patch - ) do %> - Run - <% end %> - <% end %> +<% end %> +<% if @object.editable? %> + <%= content_for :pi_input_form %> + <%= link_to(url_for('container_request[state]' => 'Committed'), + class: 'btn btn-primary run-pipeline-button', + method: :patch + ) do %> + Run + <% end %> <% end %> + +<%= render_unreadable_inputs_present %>