[ARVADOS] updated: a3a84c13fff9ffee22c87fcd93d34a760227a89d

git at public.curoverse.com git at public.curoverse.com
Thu Aug 21 14:49:32 EDT 2014


Summary of changes:
 apps/workbench/app/controllers/collections_controller.rb | 8 ++++++++
 apps/workbench/app/views/collections/show.html.erb       | 6 +++---
 sdk/python/arvados/commands/put.py                       | 3 +--
 3 files changed, 12 insertions(+), 5 deletions(-)

       via  a3a84c13fff9ffee22c87fcd93d34a760227a89d (commit)
       via  a131e0cc10dc70e6192fae0b4e0bce138d98ec5c (commit)
      from  112d422913b3ef68723b113a50fece7d32d13ec2 (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 a3a84c13fff9ffee22c87fcd93d34a760227a89d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Aug 21 14:49:28 2014 -0400

    3504: Don't set owner_uuid redundantly.

diff --git a/sdk/python/arvados/commands/put.py b/sdk/python/arvados/commands/put.py
index da26a3c..8cf56b6 100644
--- a/sdk/python/arvados/commands/put.py
+++ b/sdk/python/arvados/commands/put.py
@@ -463,8 +463,7 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
             try:
                 if 'name' in collection:
                     arvados.api().collections().update(uuid=output,
-                                                       body={"owner_uuid": project_link["tail_uuid"],
-                                                             "name": project_link["name"]}).execute()
+                                                       body={"name": project_link["name"]}).execute()
                 else:
                     create_project_link(output, project_link)
             except apiclient.errors.Error as error:

commit a131e0cc10dc70e6192fae0b4e0bce138d98ec5c
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Aug 21 14:44:30 2014 -0400

    3036: Use preload_objects to fetch owner_uuids in the controller instead of in the view.

diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index a4925bd..1cc4966 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -170,6 +170,14 @@ class CollectionsController < ApplicationController
         .where(head_uuid: @object.uuid, link_class: 'name').results
       project_hash = Group.where(uuid: @project_links.map(&:tail_uuid)).to_hash
       @projects = project_hash.values
+
+      if @object.uuid.match /[0-9a-f]{32}/
+        @same_pdh = Collection.filter([["portable_data_hash", "=", @object.portable_data_hash]])
+        owners = @same_pdh.map {|s| s.owner_uuid}.to_a
+        preload_objects_for_dataclass Group, owners
+        preload_objects_for_dataclass User, owners
+      end
+
       @permissions = Link.limit(RELATION_LIMIT).order("modified_at DESC")
         .where(head_uuid: @object.uuid, link_class: 'permission',
                name: 'can_read').results
diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb
index cc19000..7d8ac4d 100644
--- a/apps/workbench/app/views/collections/show.html.erb
+++ b/apps/workbench/app/views/collections/show.html.erb
@@ -35,11 +35,11 @@
       </div>
       <div class="panel-body">
         <img src="/favicon.ico" class="pull-right" alt="" style="opacity: 0.3"/>
-        <% if @object.uuid.match /[0-9a-f]{32}/ %>
+        <% if defined? @same_pdh %>
           <p>Found in collections:<p>
           <p>
-            <% cols = Collection.filter([["portable_data_hash", "=", @object.portable_data_hash]]).each do |c| %>
-              <%= link_to_if_arvados_object c.owner_uuid, {:friendly_name => true} %> / <%= link_to_if_arvados_object c, {:friendly_name => true} %><br>
+            <% @same_pdh.each do |c| %>
+              <%= link_to_if_arvados_object get_object(c.owner_uuid), {:friendly_name => true} %> / <%= link_to_if_arvados_object c, {:friendly_name => true} %><br>
             <% end %>
           </p>
         <% else %>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list