X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/74d98b5f5cfee651eebfd8c63842a08241dcd736..f4750d53482ddb3990426563bb424f72790b9090:/apps/workbench/app/views/workflows/_show_definition.html.erb diff --git a/apps/workbench/app/views/workflows/_show_definition.html.erb b/apps/workbench/app/views/workflows/_show_definition.html.erb index f36264783f..f0e01a12ad 100644 --- a/apps/workbench/app/views/workflows/_show_definition.html.erb +++ b/apps/workbench/app/views/workflows/_show_definition.html.erb @@ -1,3 +1,7 @@ +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + <% wf_def = ActiveSupport::HashWithIndifferentAccess.new YAML::load(@object.definition) if @object.definition wf_def = wf_def[:"$graph"].andand[0] || wf_def if wf_def @@ -17,70 +21,32 @@ outputs = wf_def.andand["outputs"] items['outputs'] = outputs if outputs + + # preload the collections + collections_pdhs = [] + items.each do |k, v| + v.to_s.scan(/([0-9a-f]{32}\+\d+)/).each {|l| collections_pdhs += l} + end + collections_pdhs.compact.uniq + preload_for_pdhs collections_pdhs if collections_pdhs.any? + preload_links_for_objects collections_pdhs if collections_pdhs.any? %>
- +
<% items.each do |k, v| %> - <% if ['baseCommand', 'arguments'].include? k %> - - - - - <% end %> - - <% if ['inputs', 'outputs'].include? k %> - - - - - <% end %> - - <% if k == 'hints' %> - <% end %> <% end %>
- <%= k %>: - -
- <%=v%> -
-
- <%= k %>: - - <% val = JSON.pretty_generate(v) %> -
- <% val.each_line do |l| %> - <% text_part = l %> - <% match = l.match /\"keep:.*?\"/ %> - <% if match %> - <% text_part = l[0..l.index("\"keep:")-1] %> - <% loc_part = match[0][6..-2] %> - <% end %> - <%= text_part %><%= if loc_part then link_to_arvados_object_if_readable(loc_part, loc_part, friendly_name: true) end %> <% if loc_part then %>
<% end %>
- <% end %> -
-
<%= k %>: <% val = JSON.pretty_generate(v) %> -
- <% val.each_line do |l| %> - <% text_part = l %> - <% match = l.match /\"keep:.*?\"/ %> - <% if match %> - <% text_part = l[0..l.index("\"keep:")-1] %> - <% loc_part = match[0][6..-2] %> - <% end %> - <%= text_part %><%= if loc_part then link_to_arvados_object_if_readable(loc_part, loc_part, friendly_name: true) end %> <% if loc_part then %>
<% end %>
- <% end %> -
+ <%= render partial: 'show_text_with_locators', locals: {data_height: 300, text_data: val} %>