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 <%= hidden_field :options, :no_reuse, :value => true %>
17 <%= button_tag "Same as this run", {class: 'btn btn-primary', id: "re-run-same-job-button"} %>
19 <% if !@object.supplied_script_version.nil? and !@object.supplied_script_version.empty? and @object.script_version != @object.supplied_script_version%>
20 <%= form_tag '/jobs', style: "display:inline" do |f| %>
21 <% [:script, :repository, :output_is_persistent, :supplied_script_version, :nondeterministic].each do |d| %>
22 <%= hidden_field :job, d, :value => @object[d] %>
24 <%= hidden_field :job, :script_version, :value => @object[:supplied_script_version] %>
25 <% [:script_parameters, :runtime_constraints].each do |d| %>
26 <%= hidden_field :job, d, :value => JSON.dump(@object[d]) %>
28 <%= hidden_field :options, :no_reuse, :value => true %>
29 <%= button_tag "Latest (#{@object.repository}/#{@object.supplied_script_version})", {class: 'btn btn-primary', id: "re-run-latest-job-button"} %>
35 <table class="table pipeline-components-table">
37 <col style="width: 20%" />
38 <col style="width: 24%" />
39 <col style="width: 12%" />
40 <col style="width: 45%" />
47 <%# format:'js' here helps browsers avoid using the cached js
48 content in html context (e.g., duplicate tab -> see
50 <%= link_to '(refresh)', {format: :js}, {class: 'refresh hide', remote: true, method: 'get'} %>
61 <%= @object[:script] %><br>
62 <span class="deemphasize"><%= @object[:script_version] %></span>
65 <%= render partial: 'job_progress', locals: {:j => @object} %>
66 <% if @object.running == false %>
67 <% if @object[:job].andand[:uuid] %>
68 <span class="deemphasize">
69 <%= link_to("..."+@object[:job][:uuid].last(15), job_url(id: @object[:job][:uuid])) %>
72 <% current_job = @object %>
73 <% if current_job.andand[:log] %>
74 <% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(current_job[:log])%>
75 <% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
76 <% c.files.each do |file| %>
77 <br/><span class="deemphasize">
78 <a href="<%= collection_path(current_job[:log]) %>/<%= file[1] %>?disposition=inline&size=<%= file[2] %>">log</a>
86 <%= render(partial: 'job_status_label',
87 locals: { :j => @object }) %>
89 <%= link_to_if_arvados_object @object[:output], {:thumbnail => true} %>
93 <tr><td colspan="5"></td></tr>