X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f3658ececac430166ee9766be1deee6a61153d0f..7f5a540ea4b1bad1a7b1646543e0cd48ff2af7ba:/apps/workbench/app/views/work_unit/_component_detail.html.erb diff --git a/apps/workbench/app/views/work_unit/_component_detail.html.erb b/apps/workbench/app/views/work_unit/_component_detail.html.erb new file mode 100644 index 0000000000..045154a220 --- /dev/null +++ b/apps/workbench/app/views/work_unit/_component_detail.html.erb @@ -0,0 +1,91 @@ +
+
+
+ + <% [:uuid, :modified_by_user_uuid, :created_at, :started_at, :finished_at, :priority].each do |k| %> + <% val = current_obj.send(k) if current_obj.respond_to?(k) %> + <% unless val.nil? %> + + + + + <% end %> + <% end %> +
+ <%= k.to_s %>: + + <% if k == :uuid %> + <%= link_to_arvados_object_if_readable(val, val, link_text: val) %> + <% elsif k.to_s.end_with? 'uuid' %> + <%= link_to_arvados_object_if_readable(val, val, friendly_name: true) %> + <% elsif k.to_s.end_with? '_at' %> + <%= render_localized_date(val) %> + <% else %> + <%= val %> + <% end %> +
+
+
+ + <% # link to repo tree/file only if the repo is readable + # and the commit is a sha1... + repo = + (/^[0-9a-f]{40}$/ =~ current_obj.script_version and + Repository.where(name: current_obj.repository).first) + + # ...and the api server provides an http:// or https:// url + repo = nil unless repo.andand.http_fetch_url + %> + <% [:script, :repository, :script_version, :supplied_script_version, :nondeterministic].each do |k| %> + <% val = current_obj.send(k) if current_obj.respond_to?(k) %> + <% unless val.nil? %> + + + + + <% end %> + <% end %> + <% if current_obj.runtime_constraints.andand[:docker_image] and current_obj.docker_image %> + + + + + + + + + <% end %> +
+ <%= k.to_s %>: + + <% if repo and k == :repository %> + <%= link_to val, show_repository_tree_path(id: repo.uuid, commit: current_obj.script_version, path: '/') %> + <% elsif repo and k == :script %> + <%= link_to val, show_repository_blob_path(id: repo.uuid, commit: current_obj.script_version, path: 'crunch_scripts/'+current_obj.script) %> + <% elsif repo and k == :script_version %> + <%= link_to val, show_repository_commit_path(id: repo.uuid, commit: current_obj.script_version) %> + <% else %> + <%= val %> + <% end %> +
+ docker_image: + + <%= current_obj.runtime_constraints[:docker_image] %> +
+ docker_image_locator: + + <%= link_to_arvados_object_if_readable(current_obj.docker_image, + current_obj.docker_image, friendly_name: true) %> +
+
+
+ <% unless current_obj.parameters.nil? %> +
+
+

script_parameters:

+
<%= JSON.pretty_generate(current_obj.parameters) rescue nil %>
+
+
+ <% end %> +
+