2 <div class="pull-right">
3 <% if @object.running %>
4 <%= form_tag "/jobs/#{@object.uuid}/cancel", style: "display:inline; padding-left: 1em" do |f| %>
5 <%= button_tag "Cancel running job", {class: 'btn btn-danger', id: "cancel-job-button"} %>
8 Re-run job using script version:
9 <%= form_tag '/jobs', style: "display:inline; padding-left: 1em" do |f| %>
10 <% [:script, :script_version, :repository, :output_is_persistent, :supplied_script_version, :nondeterministic].each do |d| %>
11 <%= hidden_field :job, d, :value => @object[d] %>
13 <% [:script_parameters, :runtime_constraints].each do |d| %>
14 <%= hidden_field :job, d, :value => JSON.dump(@object[d]) %>
16 <%= button_tag "Same as this run", {class: 'btn btn-primary', id: "re-run-same-job-button"} %>
18 <% 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%>
19 <%= form_tag '/jobs', style: "display:inline" do |f| %>
20 <% [:script, :repository, :output_is_persistent, :supplied_script_version, :nondeterministic].each do |d| %>
21 <%= hidden_field :job, d, :value => @object[d] %>
23 <%= hidden_field :job, :script_version, :value => @object[:supplied_script_version] %>
24 <% [:script_parameters, :runtime_constraints].each do |d| %>
25 <%= hidden_field :job, d, :value => JSON.dump(@object[d]) %>
27 <%= button_tag "Latest (#{@object.repository}/#{@object.supplied_script_version})", {class: 'btn btn-primary', id: "re-run-latest-job-button"} %>
33 <table class="table pipeline-components-table">
35 <col style="width: 20%" />
36 <col style="width: 24%" />
37 <col style="width: 12%" />
38 <col style="width: 45%" />
45 <%# format:'js' here helps browsers avoid using the cached js
46 content in html context (e.g., duplicate tab -> see
48 <%= link_to '(refresh)', {format: :js}, {class: 'refresh hide', remote: true, method: 'get'} %>
59 <%= @object[:script] %><br>
60 <span class="deemphasize"><%= @object[:script_version] %></span>
63 <%= render partial: 'job_progress', locals: {:j => @object} %>
64 <% if @object.running == false %>
65 <% if @object[:job].andand[:uuid] %>
66 <span class="deemphasize">
67 <%= link_to("..."+@object[:job][:uuid].last(15), job_url(id: @object[:job][:uuid])) %>
70 <% current_job = @object %>
71 <% if current_job.andand[:log] %>
72 <% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(current_job[:log])%>
73 <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
74 <% c.files.each do |file| %>
75 <br/><span class="deemphasize">
76 <a href="<%= collection_path(current_job[:log]) %>/<%= file[1] %>?disposition=inline&size=<%= file[2] %>">log</a>
84 <%= render(partial: 'job_status_label',
85 locals: { :j => @object }) %>
87 <%= link_to_if_arvados_object @object[:output], {:thumbnail => true} %>
91 <tr><td colspan="5"></td></tr>