[ARVADOS] updated: 575b2f04b80a8bb2cf5ab61ce80a94d5fe017aa3

Git user git at public.curoverse.com
Mon May 8 21:21:39 EDT 2017


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

       via  575b2f04b80a8bb2cf5ab61ce80a94d5fe017aa3 (commit)
      from  5a649613ade7f4bb9c80bbfec62604698383c1d1 (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 575b2f04b80a8bb2cf5ab61ce80a94d5fe017aa3
Author: radhika <radhika at curoverse.com>
Date:   Mon May 8 21:21:02 2017 -0400

    10645: regexp for keep_locator_in_json format

diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index 58ad619..db6ae38 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -670,14 +670,9 @@ module ApplicationHelper
     render_runtime duration, use_words, round_to_min
   end
 
-  # Keep locators in input mounts are of the form \"keep:<pdh/file_path>\"
-  MOUNT_INPUT_KEEP_LOCATOR_REGEXP = /(.*)(([0-9a-f]{32}\+\d+)(.*)\"(.*))/
-  def mount_input_keep_locator str
-    MOUNT_INPUT_KEEP_LOCATOR_REGEXP.match str
-  end
-
-  KEEP_LOCATOR_REGEXP = /(.*)([0-9a-f]{32}\+\d+)(.*)/
-  def keep_locator str
+  # Keep locators are expected to be of the form \"...<pdh/file_path>\"
+  KEEP_LOCATOR_REGEXP = /(.*)(([0-9a-f]{32}\+\d+)(.*)\"(.*))/
+  def keep_locator_in_json str
     KEEP_LOCATOR_REGEXP.match str
   end
 
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 c1d43af..a767a16 100644
--- a/apps/workbench/app/views/work_units/_component_detail.html.erb
+++ b/apps/workbench/app/views/work_units/_component_detail.html.erb
@@ -160,9 +160,11 @@
                         <% val = JSON.pretty_generate(val) %>
                         <% val.each_line do |l| %>
                           <% l.split(' ').each do |w| %>
-                            <% match = keep_locator w %>
+                            <% match = keep_locator_in_json w %>
                             <% if match %>
-                              <%=match[1]%><%= link_to_arvados_object_if_readable(match[2], match[2], friendly_name: true) %><%=match[3]%>
+                              <% pdh_readable = object_readable(match[2]) %>
+                              <% quote_char = '"' %>
+                              <%= match[1] %><% if pdh_readable then %><%= link_to_arvados_object_if_readable(match[3], match[3], friendly_name: true) %><%= link_to_arvados_object_if_readable(match[2], match[2], link_text: match[4]) %><%=quote_char%><% else %><%= match[2]%><% end %><%=match[5]%>
                             <% else %>
                               <%= w %>
                             <% end %>
@@ -191,13 +193,13 @@
                     <div style="max-height:400px; overflow:auto;">
                       <% mnt_inputs.each_line do |l| %>
                         <% text_part = l %>
-                          <% match = mount_input_keep_locator l %>
+                          <% match = keep_locator_in_json 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 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>
+                          <span style="white-space: pre-wrap; margin: none;"><%= text_part %><% if match %><% if pdh_readable then %><%= link_to_arvados_object_if_readable(match[3], match[3], friendly_name: true) %><%= link_to_arvados_object_if_readable(match[2], match[2], link_text: match[4]) %><%=quote_char%><% else %><%= match[2]%><% end %><%=match[5]%><br/><% end %></span>
                       <% end %>
                     </div>
                   </td>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list