1 <div class="container">
4 <% if current_obj.uuid.nil? %>
5 No <%= current_obj.title %> has been submitted yet.
8 <% keys = [:uuid, :modified_by_user_uuid, :created_at, :started_at, :finished_at, :container_uuid, :priority] %>
9 <% keys << :outputs if @object.uuid == current_obj.uuid %>
10 <% keys.each do |k| %>
11 <% val = current_obj.send(k) if current_obj.respond_to?(k) %>
13 <% has_val = val.andand.any? if k == :outputs %>
16 <td style="padding-right: 1em">
21 <%= link_to_arvados_object_if_readable(val, val, link_text: val) %>
22 <% elsif k.to_s.end_with? 'uuid' %>
23 <%= link_to_arvados_object_if_readable(val, val, friendly_name: true) %>
24 <% elsif k.to_s.end_with? '_at' %>
25 <%= render_localized_date(val) %>
26 <% elsif k == :outputs and val.any? %>
27 <% if val.size == 1 %>
28 <%= link_to_arvados_object_if_readable(val[0], 'Output data not available', friendly_name: true) %>
30 <%= render partial: 'work_units/show_outputs', locals: {id: current_obj.uuid, outputs: val, align:""} %>
42 <div class="col-md-6">
44 <% # link to repo tree/file only if the repo is readable
45 # and the commit is a sha1...
47 (/^[0-9a-f]{40}$/ =~ current_obj.script_version and
48 Repository.where(name: current_obj.repository).first)
50 # ...and the api server provides an http:// or https:// url
51 repo = nil unless repo.andand.http_fetch_url
53 <% [:script, :repository, :script_version, :supplied_script_version, :nondeterministic,
54 :command, :cwd, :environment, :mounts, :output_path].each do |k| %>
55 <% val = current_obj.send(k) if current_obj.respond_to?(k) %>
58 <td style="padding-right: 1em">
62 <% if repo and k == :repository %>
63 <%= link_to val, show_repository_tree_path(id: repo.uuid, commit: current_obj.script_version, path: '/') %>
64 <% elsif repo and k == :script %>
65 <%= link_to val, show_repository_blob_path(id: repo.uuid, commit: current_obj.script_version, path: 'crunch_scripts/'+current_obj.script) %>
66 <% elsif repo and k == :script_version %>
67 <%= link_to val, show_repository_commit_path(id: repo.uuid, commit: current_obj.script_version) %>
75 <% if current_obj.runtime_constraints.andand[:docker_image] and current_obj.docker_image %>
77 <td style="padding-right: 1em">
81 <%= current_obj.runtime_constraints[:docker_image] %>
85 <td style="padding-right: 1em">
89 <%= link_to_arvados_object_if_readable(current_obj.docker_image,
90 current_obj.docker_image, friendly_name: true) %>
93 <% elsif current_obj.docker_image %>
95 <td style="padding-right: 1em">
99 <%= link_to_arvados_object_if_readable(current_obj.docker_image,
100 current_obj.docker_image, friendly_name: true) %>
108 <% if current_obj.parameters and !current_obj.parameters.empty? %>
110 <div class="col-md-6">
111 <p>script_parameters:</p>
112 <pre><%= JSON.pretty_generate(current_obj.parameters) rescue nil %></pre>