1 <% if @object.state != "Running" %>
2 <%= form_tag '/jobs', style: "display:inline; padding-left: 1em" do |f| %>
3 <% [:script, :script_version, :repository, :supplied_script_version, :nondeterministic].each do |d| %>
4 <%= hidden_field :job, d, :value => @object[d] %>
6 <% [:script_parameters, :runtime_constraints].each do |d| %>
7 <%= hidden_field :job, d, :value => JSON.dump(@object[d]) %>
9 <%= button_tag ({class: 'btn btn-sm btn-primary', id: "re-run-same-job-button",
10 title: 'Re-run job using the same script version as this run'}) do %>
11 <i class="fa fa-fw fa-gear"></i> Re-run same version
14 <% if @object.respond_to? :supplied_script_version and !@object.supplied_script_version.nil? and !@object.supplied_script_version.empty? and @object.script_version != @object.supplied_script_version%>
15 <%= form_tag '/jobs', style: "display:inline" do |f| %>
16 <% [:script, :repository, :supplied_script_version, :nondeterministic].each do |d| %>
17 <%= hidden_field :job, d, :value => @object[d] %>
19 <%= hidden_field :job, :script_version, :value => @object[:supplied_script_version] %>
20 <% [:script_parameters, :runtime_constraints].each do |d| %>
21 <%= hidden_field :job, d, :value => JSON.dump(@object[d]) %>
23 <%= button_tag ({class: 'btn btn-sm btn-primary', id: "re-run-latest-job-button",
24 title: 'Re-run job using the latest script version'}) do%>
25 <i class="fa fa-fw fa-gear"></i> Re-run latest version