X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3280e2dc5fd16dca63c389b931658d4420faabaf..3d3f25043f3f270a675391237a2a2a73495e1e37:/apps/workbench/app/views/pipeline_instances/_running_component.html.erb diff --git a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb index 1a9cb3562a..2ab8da1f4c 100644 --- a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb +++ b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb @@ -96,6 +96,15 @@
+ <% # link to repo tree/file only if the repo is readable + # and the commit is a sha1... + repo = + (/^[0-9a-f]{40}$/ =~ current_component[:script_version] and + Repository.where(name: current_component[: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| %>
@@ -104,6 +113,12 @@ <% if current_component[k].nil? %> (none) + <% elsif repo and k == :repository %> + <%= link_to current_component[k], show_repository_tree_path(id: repo.uuid, commit: current_component[:script_version], path: '/') %> + <% elsif repo and k == :script %> + <%= link_to current_component[k], show_repository_blob_path(id: repo.uuid, commit: current_component[:script_version], path: 'crunch_scripts/'+current_component[:script]) %> + <% elsif repo and k == :script_version %> + <%= link_to current_component[k], show_repository_commit_path(id: repo.uuid, commit: current_component[:script_version]) %> <% else %> <%= current_component[k] %> <% end %>