[ARVADOS] created: 100a504ea7f42cc29e71800150cf95c90efe6f67

git at public.curoverse.com git at public.curoverse.com
Mon May 18 22:11:18 EDT 2015


        at  100a504ea7f42cc29e71800150cf95c90efe6f67 (commit)


commit 100a504ea7f42cc29e71800150cf95c90efe6f67
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Mon May 18 22:09:21 2015 -0400

    6064: display only 5 objects for which this collection is the output in source_summary.

diff --git a/apps/workbench/app/models/arvados_base.rb b/apps/workbench/app/models/arvados_base.rb
index 2fca11e..4b0a6cf 100644
--- a/apps/workbench/app/models/arvados_base.rb
+++ b/apps/workbench/app/models/arvados_base.rb
@@ -102,7 +102,7 @@ class ArvadosBase < ActiveRecord::Base
     # Only do one lookup on the API side per {class, uuid, workbench
     # request} unless {cache: false} is given via opts.
     cache_key = "request_#{Thread.current.object_id}_#{self.to_s}_#{uuid}"
-    if opts[:cache] == false
+    if false != opts[:cache]
       Rails.cache.write cache_key, arvados_api_client.api(self, '/' + uuid)
     end
     hash = Rails.cache.fetch cache_key do
diff --git a/apps/workbench/app/views/collections/_show_source_summary.html.erb b/apps/workbench/app/views/collections/_show_source_summary.html.erb
index 3d8032b..1d15c96 100644
--- a/apps/workbench/app/views/collections/_show_source_summary.html.erb
+++ b/apps/workbench/app/views/collections/_show_source_summary.html.erb
@@ -7,8 +7,15 @@
 <% end %>
 
 <% if @output_of.andand.any? %>
-  <p><i>This collection was the output of:</i><br />
-    <% pipelines = PipelineInstance.filter([["components", "like", "%#{@object.uuid}%"]]).each do |pipeline| %>
+  <% pipelines = PipelineInstance.limit(5).filter([["components", "like", "%#{@object.uuid}%"]]) %>
+  <%
+    message = "This collection was the output of the following:"
+    if pipelines.items_available > pipelines.results.size
+      message += ' (' + (pipelines.items_available - pipelines.results.size).to_s + ' more results are not shown)'
+    end
+  %>
+  <p><i><%= message %></i><br />
+    <% pipelines.each do |pipeline| %>
       <% pipeline.components.each do |cname, c| %>
         <% if c[:output_uuid] == @object.uuid %>
           <b><%= cname %></b> component of <b><%= link_to_if_arvados_object(pipeline, friendly_name: true) %></b>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list