-<div class="pull-right">
- <% if @object.running %>
- <%= form_tag "/jobs/#{@object.uuid}/cancel", style: "display:inline; padding-left: 1em" do |f| %>
- <%= button_tag "Cancel running job", {class: 'btn btn-danger', id: "cancel-job-button"} %>
- <% end %>
- <% else %>
- Re-run job using version:
- <%= form_tag '/jobs', style: "display:inline; padding-left: 1em" do |f| %>
- <% [:script, :script_version, :repository, :output_is_persistent, :supplied_script_version, :nondeterministic].each do |d| %>
- <%= hidden_field :job, d, :value => @object[d] %>
- <% end %>
- <% [:script_parameters, :runtime_constraints].each do |d| %>
- <%= hidden_field :job, d, :value => JSON.dump(@object[d]) %>
- <% end %>
- <%= hidden_field :options, :no_reuse, :value => true %>
- <%= button_tag "Same (#{@object.script_version.slice 0,8}...)", {class: 'btn btn-primary', id: "re-run-same-job-button"} %>
- <% end %>
-
- <%= form_tag '/jobs', style: "display:inline" do |f| %>
- <% [:script, :repository, :output_is_persistent, :supplied_script_version, :nondeterministic].each do |d| %>
- <%= hidden_field :job, d, :value => @object[d] %>
- <% end %>
- <%= hidden_field :job, :script_version, :value => @object[:supplied_script_version] %>
- <% [:script_parameters, :runtime_constraints].each do |d| %>
- <%= hidden_field :job, d, :value => JSON.dump(@object[d]) %>
- <% end %>
- <%= hidden_field :options, :no_reuse, :value => true %>
- <%= button_tag "Latest (#{@object.repository}/#{@object.supplied_script_version})", {class: 'btn btn-primary', id: "re-run-latest-job-button"} %>
-<% end %>
-<% end %>
-</div>
-
-<table class="table pipeline-components-table">
- <colgroup>
- <col style="width: 20%" />
- <col style="width: 24%" />
- <col style="width: 12%" />
- <col style="width: 45%" />
- </colgroup>
- <thead>
- <tr><th>
- script, version
- </th><th>
- progress
- <%# format:'js' here helps browsers avoid using the cached js
- content in html context (e.g., duplicate tab -> see
- javascript) %>
- <%= link_to '(refresh)', {format: :js}, {class: 'refresh hide', remote: true, method: 'get'} %>
- </th>
- <th></th>
- <th>
- output
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <%= @object[:script] %><br>
- <span class="deemphasize"><%= @object[:script_version] %></span>
- </td>
- <td>
- <%= render partial: 'job_progress', locals: {:j => @object} %>
- <% if @object.running == false %>
- <% if @object[:job].andand[:uuid] %>
- <span class="deemphasize">
- <%= link_to("..."+@object[:job][:uuid].last(15), job_url(id: @object[:job][:uuid])) %>
- </span>