<% 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 script 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 %>
<%= button_tag "Same as this run", {class: 'btn btn-primary', id: "re-run-same-job-button"} %>
<% end %>
<% 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%>
<%= 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 %>
<%= button_tag "Latest (#{@object.repository}/#{@object.supplied_script_version})", {class: 'btn btn-primary', id: "re-run-latest-job-button"} %>
<% end %>
<% end %>
<% end %>
script, version
|
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'} %>
|
|
output
|
<%= @object[:script] %>
<%= @object[:script_version] %>
|
<%= render partial: 'job_progress', locals: {:j => @object} %>
<% if @object.running == false %>
<% if @object[:job].andand[:uuid] %>
<%= link_to("..."+@object[:job][:uuid].last(15), job_url(id: @object[:job][:uuid])) %>
<% current_job = @object %>
<% if current_job.andand[:log] %>
<% fixup = /([a-f0-9]{32}\+\d+)(\+?.*)/.match(current_job[:log])%>
<% Collection.limit(1).where(uuid: fixup[1]).each do |c| %>
<% c.files.each do |file| %>
log
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
|
<%= render(partial: 'job_status_label',
locals: { :j => @object }) %>
|
<%= link_to_if_arvados_object @object[:output], {:thumbnail => true} %>
|
|