b365dc552905fc993654f85d605a33f4cca2a5f3
[arvados.git] / apps / workbench / app / views / container_requests / _show_inputs.html.erb
1 <% n_inputs = cwl_inputs_required(@object, @object.mounts[:"/var/lib/cwl/workflow.json"][:content][:inputs], [:mounts, :"/var/lib/cwl/cwl.input.json", :content]) %>
2
3 <% content_for :pi_input_form do %>
4 <form role="form" style="width:60%">
5   <div class="form-group">
6     <% workflow = @object.mounts[:"/var/lib/cwl/workflow.json"][:content] %>
7     <% workflow[:inputs].each do |input| %>
8       <label for="#input-<%= input[:id] %>">
9         <%= input[:label] || input[:id] %>
10       </label>
11       <div>
12         <p class="form-control-static">
13           <%= render_cwl_input @object, input, [:mounts, :"/var/lib/cwl/cwl.input.json", :content] %>
14         </p>
15       </div>
16       <p class="help-block">
17         <%= input[:doc] %>
18       </p>
19     <% end %>
20   </div>
21 </form>
22 <% end %>
23
24 <% if n_inputs == 0 %>
25   <p><i>This workflow does not need any further inputs specified.  Click the "Run" button at the bottom of the page to start the workflow.</i></p>
26 <% else %>
27   <p><i>Provide <%= n_inputs > 1 ? 'values' : 'a value' %> for the following <%= n_inputs > 1 ? 'parameters' : 'parameter' %>, then click the "Run" button to start the workflow.</i></p>
28 <% end %>
29
30 <% if @object.editable? %>
31   <%= content_for :pi_input_form %>
32   <%= link_to(url_for('container_request[state]' => 'Committed'),
33         class: 'btn btn-primary run-pipeline-button',
34         method: :patch
35         ) do %>
36     Run <i class="fa fa-fw fa-play"></i>
37   <% end %>
38 <% end %>
39
40 <%= render_unreadable_inputs_present %>