[ARVADOS] updated: 97d759d73e24017c9cab74325d866960389c11a5

Git user git at public.curoverse.com
Thu May 11 08:55:39 EDT 2017


Summary of changes:
 .../app/controllers/workflows_controller.rb        |  4 ++
 apps/workbench/app/helpers/application_helper.rb   |  4 +-
 .../application/_show_text_with_locators.html.erb  | 31 ++++++++++----
 .../views/work_units/_component_detail.html.erb    | 21 +++++++++-
 .../app/views/workflows/_show_definition.html.erb  | 48 ++++++++++++++++++++++
 apps/workbench/app/views/workflows/show.html.erb   | 20 +++++++++
 apps/workbench/fpm-info.sh                         |  9 +++-
 .../container_requests_controller_test.rb          |  4 +-
 .../test/controllers/workflows_controller_test.rb  | 12 ++++++
 apps/workbench/test/integration/work_units_test.rb | 17 ++++++++
 .../ubuntu1604/Dockerfile                          |  2 +-
 build/run-build-packages-one-target.sh             |  8 ++++
 build/run-library.sh                               |  8 +++-
 build/run-tests.sh                                 | 17 ++++----
 sdk/cwl/arvados_cwl/__init__.py                    | 11 ++++-
 sdk/cwl/arvados_cwl/crunch_script.py               |  3 +-
 sdk/cwl/setup.py                                   |  4 +-
 sdk/python/arvados/collection.py                   |  2 +-
 sdk/python/tests/test_collections.py               | 25 ++++++++++-
 .../api/app/controllers/application_controller.rb  | 32 +++++++--------
 .../arvados/v1/collections_controller.rb           |  4 --
 .../controllers/arvados/v1/groups_controller.rb    | 12 +++++-
 services/api/app/models/arvados_model.rb           |  8 ++++
 services/api/app/models/collection.rb              |  4 ++
 services/api/app/models/container.rb               |  4 ++
 services/api/app/models/container_request.rb       |  4 ++
 services/api/app/models/job.rb                     |  4 ++
 services/api/app/models/pipeline_instance.rb       |  4 ++
 services/api/app/models/pipeline_template.rb       |  4 ++
 services/api/app/models/workflow.rb                |  4 ++
 services/api/config/application.default.yml        | 10 ++---
 services/api/fpm-info.sh                           |  2 +-
 .../arvados/v1/groups_controller_test.rb           | 15 +++++++
 services/ws/config.go                              | 25 ++++++-----
 services/ws/event_source.go                        |  9 +++-
 services/ws/server.go                              |  5 ++-
 tools/arvbox/lib/arvbox/docker/Dockerfile.base     |  3 +-
 37 files changed, 327 insertions(+), 76 deletions(-)
 create mode 100644 apps/workbench/app/views/workflows/_show_definition.html.erb
 create mode 100644 apps/workbench/app/views/workflows/show.html.erb

       via  97d759d73e24017c9cab74325d866960389c11a5 (commit)
       via  a795e5e02791cb7920aaded26bfa83a7ace1f386 (commit)
       via  02b75a37c98f3357ba079d01166576153032a238 (commit)
       via  411109e1c30d61bce39f29851838540e0a5787e5 (commit)
       via  8b6d154d2a1e89bbabb8f7730d37bffb54d4de6d (commit)
       via  6ad31a32b13094ce162a2175956232403b13693f (commit)
       via  209c2259a8bf0218e585da037a04e2d9d79400ee (commit)
       via  a5c53dceed8480e667249fc5fee3349bbaf20ec8 (commit)
       via  62a0bbe9c1f6e3376b25d0f415302eb7dcdf55f3 (commit)
       via  a7bd5fa6c4353745260398eaa61c5b857975d222 (commit)
       via  4644e14f4158e3fa288abf6d979d2526606e5615 (commit)
       via  c22bd85568bdef0358a82bb20e4995477c7d24ac (commit)
       via  96b33e5ac77dbd0a003b428d5531431f3e999bef (commit)
       via  9456885954b0bff02721bbb14da296be212efdc4 (commit)
       via  ba917d72d48615cdd0c6da87d41b6bd0f9f26666 (commit)
       via  40ce7856e2426dc7381bf493eacf2fa42a9774b5 (commit)
       via  4bc2f36b8e475b0dc1145fa27e665cdd8c85f809 (commit)
       via  47f29d75759db7e4d81203e110257f1a471f82e7 (commit)
       via  8e0303a592671af3578af904370d226f4991e635 (commit)
       via  4c1d34eee72603b850bea8d5dc95c225e644954f (commit)
       via  79aeb557d94681fb7e55321aeee2e20df1430b30 (commit)
       via  8ee2f83955b1b71571aa428335340f505c3c2264 (commit)
       via  537ff1dfe42c8a1c076ea31a137801cab8e95b96 (commit)
       via  4e32a5d047ab832e7399dedd7b5dd5f8fc364367 (commit)
       via  08e9c6aff46e182b9cd14fab9d42d21b2d7c6902 (commit)
       via  c4a0f7a714586e61ad844de58837a20c76eda2a8 (commit)
       via  3652f3ed82e994c9eea74ba1afb4aa3c11ebd697 (commit)
       via  4cacfe7a9566d7ea6f53be24daf83cf9e441aebb (commit)
       via  3f285d4c2555aa57e9b64c9890bbb494cdf46a0f (commit)
       via  f21a495d7723e72ea61c62293d56aff1a65c130c (commit)
       via  3b11d2b570d9c3f2a18886d82fb0224562c56f61 (commit)
       via  cb109bfddd08bd8136b75e90b681e4af3d60ea30 (commit)
       via  74d98b5f5cfee651eebfd8c63842a08241dcd736 (commit)
       via  5cd02331394595a6e64f19c2cc14c9955c9266dd (commit)
       via  d66c9f93da79b8bfdffdb1684f19ac388c31ce97 (commit)
       via  1586823b65c7ec7656626e491a31f3f9516a4a56 (commit)
       via  ac3bafbcbc8e6d6c6b3be13e3e29b7ab7cf4ad7a (commit)
      from  2c60e15078452202ff58eac99d44920448fb7b9a (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 97d759d73e24017c9cab74325d866960389c11a5
Author: radhika <radhika at curoverse.com>
Date:   Thu May 11 08:54:59 2017 -0400

    10645: display collection link with disposition. preload mount and command collections.

diff --git a/apps/workbench/app/views/application/_show_text_with_locators.html.erb b/apps/workbench/app/views/application/_show_text_with_locators.html.erb
index f25bd2b..4525c44 100644
--- a/apps/workbench/app/views/application/_show_text_with_locators.html.erb
+++ b/apps/workbench/app/views/application/_show_text_with_locators.html.erb
@@ -5,12 +5,27 @@
     <% text_data.each_line do |l| %>
       <% text_part = l %>
       <% match = keep_locator_in_json l %>
-      <% if match %>
-        <% text_part = match[1] %>
-        <% rindex = match[2].rindex('"'); match2 = match[2][0..rindex-1] %>
-        <% pdh_readable = object_readable(match2) %>
-        <% quote_char = '"' %>
-      <% end %>
-      <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(match2, match2, link_text: match[4]) %><% else %><%= match2%><% end %><%=quote_char+match[5]%><br/><% end %></span>
+
+      <%
+        if match
+          text_part = match[1]
+          rindex = match[2].rindex('"'); match2 = match[2][0..rindex-1]
+          quote_char = '"'
+
+          pdh_readable = object_readable(match2)
+          file_link = ''
+          if pdh_readable and match[4].size > 0
+            link_params = {controller: 'collections', action: 'show_file', uuid: match[3], file: match[4][1..-1]}
+            preview_allowed = preview_allowed_for(match[4])
+            if preview_allowed
+              file_link = link_to(raw(match[4]), link_params.merge(disposition: 'inline'))
+            else
+              file_link = link_to(raw(match[4]), link_params.merge(disposition: 'attachment'))
+            end
+          end
+        end
+      %>
+
+      <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) %><%= file_link%><% else %><%= match2%><% end %><%=quote_char+match[5]%><br/><% end %></span>
     <% end %>
   </div>
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 82cd42b..55abc75 100644
--- a/apps/workbench/app/views/work_units/_component_detail.html.erb
+++ b/apps/workbench/app/views/work_units/_component_detail.html.erb
@@ -3,9 +3,28 @@
   collections_pdhs = collections.select {|x| !CollectionsHelper.match(x).nil?}.uniq.compact
   collections_uuids = collections - collections_pdhs
   preload_collections_for_objects collections_uuids if collections_uuids.any?
-  preload_for_pdhs collections_pdhs if collections_pdhs.any?
+  preload_links_for_objects collections_uuids if collections_uuids.any?
 
   preload_objects_for_dataclass(Repository, [current_obj.repository], :name) if current_obj.repository
+
+  # if container_X, preload mounted collections
+  if @object.is_a? Container or @object.is_a? ContainerRequest
+    # get any collections in mounts
+    mounts = current_obj.send(:mounts) if current_obj.respond_to?(:mounts)
+    input_obj = mounts.andand[:"/var/lib/cwl/cwl.input.json"].andand[:content]
+    if input_obj
+      input_obj.to_s.scan(/([0-9a-f]{32}\+\d+)/).each {|cs| collections_pdhs += cs}
+    end
+
+    command = current_obj.send(:command) if current_obj.respond_to?(:command)
+    if command
+      command.to_s.scan(/([0-9a-f]{32}\+\d+)/).each {|cs| collections_pdhs += cs}
+    end
+  end
+
+  collections_pdhs.compact.uniq
+  preload_for_pdhs collections_pdhs if collections_pdhs.any?
+  preload_links_for_objects collections_pdhs if collections_pdhs.any?
 %>
 
       <div class="container">
diff --git a/apps/workbench/test/controllers/container_requests_controller_test.rb b/apps/workbench/test/controllers/container_requests_controller_test.rb
index c9e9d2f..554aaf6 100644
--- a/apps/workbench/test/controllers/container_requests_controller_test.rb
+++ b/apps/workbench/test/controllers/container_requests_controller_test.rb
@@ -116,8 +116,8 @@ class ContainerRequestsControllerTest < ActionController::TestCase
     assert_response :success
 
     assert_match /hello/, @response.body
-    assert_includes @response.body, "href=\"\/collections/fa7aeb5140e2848d39b416daeef4ffc5+45%2Ffoo" # mount input1
-    assert_includes @response.body, "href=\"\/collections/fa7aeb5140e2848d39b416daeef4ffc5+45%2Fbar" # mount input2
+    assert_includes @response.body, "href=\"\/collections/fa7aeb5140e2848d39b416daeef4ffc5+45/foo" # mount input1
+    assert_includes @response.body, "href=\"\/collections/fa7aeb5140e2848d39b416daeef4ffc5+45/bar" # mount input2
     assert_includes @response.body, "href=\"\/collections/1fd08fc162a5c6413070a8bd0bffc818+150" # mount workflow
     assert_includes @response.body, "href=\"#Log\""
     assert_includes @response.body, "href=\"#Provenance\""

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list