Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / pipeline_instances / _show_inputs.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <% n_inputs = 0 %>
6
7 <% content_for :pi_input_form do %>
8 <form role="form" style="width:60%">
9   <div class="form-group">
10     <% @object.components.each do |cname, component| %>
11       <% next if !component %>
12       <% component[:script_parameters].andand.each do |pname, pvalue_spec| %>
13         <% if pvalue_spec.is_a? Hash %>
14           <% if pvalue_spec[:description] or
15                 pvalue_spec[:required] or pvalue_spec[:optional] == false %>
16             <% n_inputs += 1 %>
17             <label for="<% "#{cname}-#{pname}" %>">
18               <%= @object.component_input_title(cname, pname) %>
19             </label>
20             <div>
21               <p class="form-control-static">
22                 <%= render_pipeline_component_attribute @object, :components, [cname, :script_parameters, pname.to_sym], pvalue_spec %>
23               </p>
24             </div>
25             <p class="help-block">
26               <%= pvalue_spec[:description] %>
27             </p>
28           <% end %>
29         <% end %>
30       <% end %>
31     <% end %>
32   </div>
33 </form>
34 <% end %>
35
36 <% if n_inputs == 0 %>
37   <p>This pipeline 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 existing settings, though.)</p>
38 <% else %>
39   <%= render_unreadable_inputs_present %>
40
41   <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 pipeline.</i></p>
42   <% if @object.editable? %>
43     <%= content_for :pi_input_form %>
44       <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
45           class: 'btn btn-primary run-pipeline-button',
46           method: :patch
47           ) do %>
48         Run <i class="fa fa-fw fa-play"></i>
49     <% end %>
50   <% end %>
51
52 <% end %>
53
54 <div style="margin-top: 1em;">
55   <p>Click the "Components" tab above to see a full list of pipeline settings.</p>
56 </div>