Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / pipeline_instances / _show_inputs.html.erb
index 5ef8444e43260af1eae46a61359b00f09aa50caa..60d44452c7b2a0ca4019a3bac326f57e0ceebaca 100644 (file)
@@ -1,3 +1,7 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <% n_inputs = 0 %>
 
 <% content_for :pi_input_form do %>
       <% next if !component %>
       <% component[:script_parameters].andand.each do |pname, pvalue_spec| %>
         <% if pvalue_spec.is_a? Hash %>
-          <% if (pvalue_spec[:description] or
-                 (pvalue_spec[:required] and not pvalue_spec[:value])) %>
+          <% if pvalue_spec[:description] or
+                pvalue_spec[:required] or pvalue_spec[:optional] == false %>
             <% n_inputs += 1 %>
             <label for="<% "#{cname}-#{pname}" %>">
-              <%= pvalue_spec[:title] ||
-                  "#{pname.to_s.humanize} for #{cname} component" %>
+              <%= @object.component_input_title(cname, pname) %>
             </label>
             <div>
               <p class="form-control-static">
 <% end %>
 
 <% if n_inputs == 0 %>
-  <p>This pipeline does not need any further inputs specified. You can start it by clicking the "Run" button.</p>
+  <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>
 <% else %>
-  <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>
-  <%= content_for :pi_input_form %>
+  <%= render_unreadable_inputs_present %>
 
-  <%= form_tag @object, :method => :put do |f| %>
-    <%= hidden_field @object.class.to_s.underscore.singularize.to_sym, :state, :value => 'RunningOnServer' %>
-    <%= button_tag({class: 'btn btn-primary run-pipeline-button'}) do %>
-      Run <i class="fa fa-fw fa-play"></i>
+  <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>
+  <% if @object.editable? %>
+    <%= content_for :pi_input_form %>
+      <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
+          class: 'btn btn-primary run-pipeline-button',
+          method: :patch
+          ) do %>
+        Run <i class="fa fa-fw fa-play"></i>
     <% end %>
   <% end %>
 
 <% end %>
 
 <div style="margin-top: 1em;">
-  <p>Click the "Components" tab above to see a full list of pipeline components and parameters.</p>
+  <p>Click the "Components" tab above to see a full list of pipeline settings.</p>
 </div>