2 collections = current_obj.outputs.flatten.uniq
3 collections << current_obj.docker_image
4 collections = collections.compact.uniq
5 collections_pdhs = collections.select {|x| !(m = CollectionsHelper.match(x)).nil?}.uniq.compact
6 collections_uuids = collections - collections_pdhs
7 preload_collections_for_objects collections_uuids if collections_uuids.any?
8 preload_for_pdhs collections_pdhs if collections_pdhs.any?
10 preload_objects_for_dataclass(Repository, [current_obj.repository], :name) if current_obj.repository
13 <div class="container">
15 <div class="col-md-5">
16 <% if current_obj.uuid.nil? %>
17 No <%= current_obj.title %> has been submitted yet.
20 <% keys = [:uuid, :modified_by_user_uuid, :created_at, :started_at, :finished_at, :container_uuid, :priority] %>
21 <% keys << :log_collection if @object.uuid != current_obj.uuid %>
22 <% keys << :outputs %>
23 <% keys.each do |k| %>
24 <% val = current_obj.send(k) if current_obj.respond_to?(k) %>
26 <% has_val = val.andand.any? if k == :outputs %>
27 <% has_val = true if k == :log_collection and current_obj.state_label == "Running" %>
30 <td style="padding-right: 1em">
35 <%= link_to_arvados_object_if_readable(val, val, link_text: val) %>
36 <% elsif k.to_s.end_with? 'uuid' %>
37 <%= link_to_arvados_object_if_readable(val, val, friendly_name: true) %>
38 <% elsif k.to_s.end_with? '_at' %>
39 <%= render_localized_date(val) %>
40 <% elsif k == :outputs and val.any? %>
41 <% if val.size == 1 %>
42 <%= link_to_arvados_object_if_readable(val[0], 'Output data not available', friendly_name: true) %>
44 <%= render partial: 'work_units/show_outputs', locals: {id: current_obj.uuid, outputs: val, align:""} %>
46 <% elsif k == :log_collection %>
47 <%= render partial: 'work_units/show_log_link', locals: {wu: current_obj} %>
58 <div class="col-md-6">
60 <% # link to repo tree/file only if the repo is readable and the commit is a sha1
61 repo = (/^[0-9a-f]{40}$/ =~ current_obj.script_version and
62 current_obj.repository and
63 object_for_dataclass(Repository, current_obj.repository, :name))
64 repo = nil unless repo.andand.http_fetch_url
66 <% [:script, :repository, :script_version, :supplied_script_version, :nondeterministic,
67 :command, :cwd, :environment, :mounts, :output_path].each do |k| %>
68 <% val = current_obj.send(k) if current_obj.respond_to?(k) %>
71 <td style="padding-right: 1em">
75 <% if repo and k == :repository %>
76 <%= link_to val, show_repository_tree_path(id: repo.uuid, commit: current_obj.script_version, path: '/') %>
77 <% elsif repo and k == :script %>
78 <%= link_to val, show_repository_blob_path(id: repo.uuid, commit: current_obj.script_version, path: 'crunch_scripts/'+current_obj.script) %>
79 <% elsif repo and k == :script_version %>
80 <%= link_to val, show_repository_commit_path(id: repo.uuid, commit: current_obj.script_version) %>
88 <% if current_obj.runtime_constraints.andand[:docker_image] and current_obj.docker_image %>
90 <td style="padding-right: 1em">
94 <%= current_obj.runtime_constraints[:docker_image] %>
98 <td style="padding-right: 1em">
102 <%= link_to_arvados_object_if_readable(current_obj.docker_image,
103 current_obj.docker_image, friendly_name: true) %>
106 <% elsif current_obj.docker_image %>
108 <td style="padding-right: 1em">
109 docker_image_locator:
112 <%= link_to_arvados_object_if_readable(current_obj.docker_image,
113 current_obj.docker_image, friendly_name: true) %>
121 <% if current_obj.parameters and !current_obj.parameters.empty? %>
123 <div class="col-md-6">
124 <p>script_parameters:</p>
125 <pre><%= JSON.pretty_generate(current_obj.parameters) rescue nil %></pre>