[ARVADOS] updated: 78408743bab09078a7361620fc6a6be524fdac73

Git user git at public.curoverse.com
Mon May 8 17:34:27 EDT 2017


Summary of changes:
 apps/workbench/app/helpers/application_helper.rb              |  5 +++++
 .../workbench/app/views/work_units/_component_detail.html.erb | 11 ++++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

       via  78408743bab09078a7361620fc6a6be524fdac73 (commit)
      from  75a76c083c8f257c33ad31582aac7a86bc866bb5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 78408743bab09078a7361620fc6a6be524fdac73
Author: radhika <radhika at curoverse.com>
Date:   Mon May 8 17:34:01 2017 -0400

    10645: display keep locator in mounts as pdh/file_name

diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index 41b3370..42215ee 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -670,6 +670,11 @@ module ApplicationHelper
     render_runtime duration, use_words, round_to_min
   end
 
+  MOUNT_INPUT_KEEP_LOCATOR_REGEXP = /(.*)(([0-9a-f]{32}\+\d+)(.*)\"(.*))/
+  def mount_input_keep_locator str
+    MOUNT_INPUT_KEEP_LOCATOR_REGEXP.match str
+  end
+
 private
   def is_textile?( object, attr )
     is_textile = object.textile_attributes.andand.include?(attr)
diff --git a/apps/workbench/app/views/work_units/_component_detail.html.erb b/apps/workbench/app/views/work_units/_component_detail.html.erb
index f128bbd..af0545d 100644
--- a/apps/workbench/app/views/work_units/_component_detail.html.erb
+++ b/apps/workbench/app/views/work_units/_component_detail.html.erb
@@ -181,12 +181,13 @@
                     <div style="max-height:400px; overflow:auto;">
                       <% mnt_inputs.each_line do |l| %>
                         <% text_part = l %>
-                          <% match = l.match /(.*)(\"keep:.*?\")/ %>
-                          <% if match and match.size == 3 %>
-                            <% text_part = match[1] + '"keep:' %>
-                            <% idx = match[2].rindex('"'); loc_part = match[2][6..idx-1] %>
+                          <% match = mount_input_keep_locator l %>
+                          <% if match %>
+                            <% text_part = match[1] %>
+                            <% pdh_readable = object_readable(match[2]) %>
+                            <% quote_char = '"' %>
                           <% end %>
-                          <span style="white-space: pre-wrap; margin: none;"><%= text_part %><%= if loc_part then link_to_arvados_object_if_readable(loc_part, loc_part, friendly_name: true) end %><% if loc_part then %><%= match[2][idx] %><br/><% end %></span>
+                          <span style="white-space: pre-wrap; margin: none;"><%= text_part %><%= if match then link_to_arvados_object_if_readable(match[3], match[3], friendly_name: true) end %><% if pdh_readable then %><%= link_to_arvados_object_if_readable(match[2], match[2], link_text: match[4]) %><%=quote_char + match[5]%><br/><% end %></span>
                       <% end %>
                     </div>
                   </td>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list