[ARVADOS] updated: 41e77a9116878cd9527d042ce80a987f2c04010e

git at public.curoverse.com git at public.curoverse.com
Mon Aug 11 17:34:52 EDT 2014


Summary of changes:
 .../app/controllers/application_controller.rb      | 25 ++++++--
 .../app/controllers/projects_controller.rb         |  9 ++-
 .../app/views/application/_content.html.erb        |  3 +-
 .../app/views/application/_content_layout.html.erb | 15 ++---
 .../views/application/_tab_line_buttons.html.erb   |  0
 apps/workbench/app/views/application/show.html.erb |  1 -
 .../app/views/collections/_show_files.html.erb     |  5 --
 .../app/views/collections/_show_recent.html.erb    | 13 -----
 .../workbench/app/views/collections/index.html.erb | 14 +++++
 apps/workbench/app/views/collections/show.html.erb |  7 ++-
 .../app/views/keep_disks/_content_layout.html.erb  |  4 +-
 .../views/pipeline_instances/_show_recent.html.erb |  7 ---
 .../app/views/pipeline_instances/index.html.erb    |  8 +++
 .../pipeline_templates/_show_components.html.erb   | 17 ------
 .../{_show_components.html.erb => show.html.erb}   |  2 +-
 .../views/projects/_show_data_collections.html.erb | 66 +---------------------
 .../projects/_show_jobs_and_pipelines.html.erb     |  5 +-
 .../views/projects/_show_other_objects.html.erb    |  5 +-
 .../projects/_show_pipeline_templates.html.erb     | 11 +---
 .../app/views/projects/_show_sharing.html.erb      |  4 +-
 .../app/views/projects/_show_subprojects.html.erb  |  5 +-
 .../app/views/projects/_show_tab_contents.html.erb |  6 +-
 ...how_data_collections.html.erb => show.html.erb} |  5 +-
 .../test/functional/projects_controller_test.rb    | 23 +++++---
 24 files changed, 95 insertions(+), 165 deletions(-)
 copy services/fuse/tests/__init__.py => apps/workbench/app/views/application/_tab_line_buttons.html.erb (100%)
 create mode 100644 apps/workbench/app/views/collections/index.html.erb
 create mode 100644 apps/workbench/app/views/pipeline_instances/index.html.erb
 copy apps/workbench/app/views/pipeline_templates/{_show_components.html.erb => show.html.erb} (93%)
 copy apps/workbench/app/views/projects/{_show_data_collections.html.erb => show.html.erb} (94%)

       via  41e77a9116878cd9527d042ce80a987f2c04010e (commit)
       via  3b98ce7a73f94fcf0ccc24bb4b3eac576744cebb (commit)
       via  acba0c0caa17d721724533803f797235ab572d94 (commit)
       via  c7cf7b6012ecf15264e48af9c7fa4a4e93519a40 (commit)
       via  9b5c87a043b10e1d983ec1c7e8b7784e5b79c5ae (commit)
      from  6060e478ec99b9dbc12785fadc76d388d6678fe3 (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 41e77a9116878cd9527d042ce80a987f2c04010e
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Aug 11 17:34:44 2014 -0400

    3531: Move the tab_line_buttons sections out of the tab pane partials
    into the appropriate "index" and "show" pages.
    
    Until now, we have been predicting which tab pane will be rendered
    with the initial page view, and putting content_for :tab_line_buttons
    in that pane. But the tab_line_buttons aren't really in that tab pane,
    so they really don't deserve to be in that partial.
    
    This worked as long as the initial tabs were being rendered in a
    different way than subsequent tab loads. Now that we render all tab
    pane contents using the same helper method, we have to clean this up.

diff --git a/apps/workbench/app/views/application/_content_layout.html.erb b/apps/workbench/app/views/application/_content_layout.html.erb
index 519e885..3e50b6e 100644
--- a/apps/workbench/app/views/application/_content_layout.html.erb
+++ b/apps/workbench/app/views/application/_content_layout.html.erb
@@ -1,13 +1,6 @@
 <%= content_for :content_top %>
-  <% if @object and @object.is_a?(Group) and @object.group_class == 'project' %>
-  <div class="pull-right">
-    <%= content_for :tab_line_buttons %>
-  </div>
-  <br clear="all" />
-<% else %>
-  <br clear="all" />
-  <div class="pull-right">
-    <%= content_for :tab_line_buttons %>
-  </div>
-<% end %>
+<div class="pull-right">
+  <%= content_for :tab_line_buttons %>
+</div>
+<br clear="all" />
 <%= content_for :tab_panes %>
diff --git a/apps/workbench/app/views/application/_tab_line_buttons.html.erb b/apps/workbench/app/views/application/_tab_line_buttons.html.erb
new file mode 100644
index 0000000..e69de29
diff --git a/apps/workbench/app/views/application/show.html.erb b/apps/workbench/app/views/application/show.html.erb
index d6eca3a..105e1c3 100644
--- a/apps/workbench/app/views/application/show.html.erb
+++ b/apps/workbench/app/views/application/show.html.erb
@@ -27,4 +27,3 @@
 <% end %>
 
 <%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>
-
diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb
index 8576d40..ea55577 100644
--- a/apps/workbench/app/views/collections/_show_files.html.erb
+++ b/apps/workbench/app/views/collections/_show_files.html.erb
@@ -1,8 +1,3 @@
-<% content_for :tab_line_buttons do %>
-<span style="padding-left: 1em">Collection storage status:</span>
-<%= render partial: 'toggle_persist', locals: { uuid: @object.uuid, current_state: (@is_persistent ? 'persistent' : 'cache') } %>
-<% end %>
-
 <% file_tree = @object.andand.files_tree %>
 <% if file_tree.nil? or file_tree.empty? %>
   <p>This collection is empty.</p>
diff --git a/apps/workbench/app/views/collections/_show_recent.html.erb b/apps/workbench/app/views/collections/_show_recent.html.erb
index 2f81073..d624749 100644
--- a/apps/workbench/app/views/collections/_show_recent.html.erb
+++ b/apps/workbench/app/views/collections/_show_recent.html.erb
@@ -1,16 +1,3 @@
-<% content_for :tab_line_buttons do %>
- <%= form_tag collections_path, method: 'get', remote: true, class: 'form-search' do %>
- <div class="input-group">
-   <%= text_field_tag :search, params[:search], class: 'form-control', placeholder: 'Search collections' %>
-   <span class="input-group-btn">
-     <%= button_tag(class: 'btn btn-info') do %>
-     <span class="glyphicon glyphicon-search"></span>
-     <% end %>
-   </span>
- </div>
- <% end %>
-<% end %>
-
 <%= render partial: "paging", locals: {results: @collections, object: @object} %>
 
 <div style="padding-right: 1em">
diff --git a/apps/workbench/app/views/collections/index.html.erb b/apps/workbench/app/views/collections/index.html.erb
new file mode 100644
index 0000000..061b05b
--- /dev/null
+++ b/apps/workbench/app/views/collections/index.html.erb
@@ -0,0 +1,14 @@
+<% content_for :tab_line_buttons do %>
+ <%= form_tag collections_path, method: 'get', remote: true, class: 'form-search' do %>
+ <div class="input-group">
+   <%= text_field_tag :search, params[:search], class: 'form-control', placeholder: 'Search collections' %>
+   <span class="input-group-btn">
+     <%= button_tag(class: 'btn btn-info') do %>
+     <span class="glyphicon glyphicon-search"></span>
+     <% end %>
+   </span>
+ </div>
+ <% end %>
+<% end %>
+
+<%= render file: 'application/index.html.erb', locals: local_assigns %>
diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb
index a51c450..83dcb45 100644
--- a/apps/workbench/app/views/collections/show.html.erb
+++ b/apps/workbench/app/views/collections/show.html.erb
@@ -90,4 +90,9 @@
   </div>
 </div>
 
-<%= render file: 'application/show.html.erb' %>
+<% content_for :tab_line_buttons do %>
+  <span style="padding-left: 1em">Collection storage status:</span>
+  <%= render partial: 'toggle_persist', locals: { uuid: @object.uuid, current_state: (@is_persistent ? 'persistent' : 'cache') } %>
+<% end %>
+
+<%= render file: 'application/show.html.erb', locals: local_assigns %>
diff --git a/apps/workbench/app/views/keep_disks/_content_layout.html.erb b/apps/workbench/app/views/keep_disks/_content_layout.html.erb
index 0f5cd7a..56177ae 100644
--- a/apps/workbench/app/views/keep_disks/_content_layout.html.erb
+++ b/apps/workbench/app/views/keep_disks/_content_layout.html.erb
@@ -17,5 +17,7 @@
   <% end %>
 <% end %>
 <%= content_for :content_top %>
-<%= content_for :tab_line_buttons %>
+<div class="pull-right">
+  <%= content_for :tab_line_buttons %>
+</div>
 <%= content_for :tab_panes %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
index 0b78e07..08b24f1 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
@@ -1,10 +1,3 @@
-<%= content_for :tab_line_buttons do %>
-<%= form_tag({action: 'compare', controller: params[:controller], method: 'get'}, {method: 'get', id: 'compare', class: 'pull-right small-form-margin'}) do |f| %>
-  <%= submit_tag 'Compare 2 or 3 selected', {class: 'btn btn-primary', disabled: true, style: 'display: none'} %>
-   
-<% end rescue nil %>
-<% end %>
-
 <%= render partial: "paging", locals: {results: @objects, object: @object} %>
 
 <%= form_tag do |f| %>
diff --git a/apps/workbench/app/views/pipeline_instances/index.html.erb b/apps/workbench/app/views/pipeline_instances/index.html.erb
new file mode 100644
index 0000000..4b73bd4
--- /dev/null
+++ b/apps/workbench/app/views/pipeline_instances/index.html.erb
@@ -0,0 +1,8 @@
+<% content_for :tab_line_buttons do %>
+<%= form_tag({action: 'compare', controller: params[:controller], method: 'get'}, {method: 'get', id: 'compare', class: 'pull-right small-form-margin'}) do |f| %>
+  <%= submit_tag 'Compare 2 or 3 selected', {class: 'btn btn-primary', disabled: true, style: 'display: none'} %>
+   
+<% end rescue nil %>
+<% end %>
+
+<%= render file: 'application/index.html.erb', locals: local_assigns %>
diff --git a/apps/workbench/app/views/pipeline_templates/_show_components.html.erb b/apps/workbench/app/views/pipeline_templates/_show_components.html.erb
index 1f2c1ba..cd03a5c 100644
--- a/apps/workbench/app/views/pipeline_templates/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_templates/_show_components.html.erb
@@ -1,18 +1 @@
-<% content_for :tab_line_buttons do %>
-  <%= button_to(choose_projects_path(id: "run-pipeline-button",
-                                     title: 'Choose project',
-                                     editable: true,
-                                     action_name: 'Choose',
-                                     action_href: pipeline_instances_path,
-                                     action_method: 'post',
-                                     action_data: {selection_param: 'pipeline_instance[owner_uuid]',
-                                                   'pipeline_instance[pipeline_template_uuid]' => @object.uuid,
-                                                   'success' => 'redirect-to-created-object'
-                                                  }.to_json),
-                { class: "btn btn-primary btn-sm", remote: true, method: 'get' }
-               ) do %>
-                   Run this pipeline
-                 <% end %>
-<% end %>
-
 <%= render_pipeline_components("editable", :json, editable: false) %>
diff --git a/apps/workbench/app/views/pipeline_templates/_show_components.html.erb b/apps/workbench/app/views/pipeline_templates/show.html.erb
similarity index 93%
copy from apps/workbench/app/views/pipeline_templates/_show_components.html.erb
copy to apps/workbench/app/views/pipeline_templates/show.html.erb
index 1f2c1ba..725d63d 100644
--- a/apps/workbench/app/views/pipeline_templates/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_templates/show.html.erb
@@ -15,4 +15,4 @@
                  <% end %>
 <% end %>
 
-<%= render_pipeline_components("editable", :json, editable: false) %>
+<%= render file: 'application/show.html.erb', locals: local_assigns %>
diff --git a/apps/workbench/app/views/projects/_show_data_collections.html.erb b/apps/workbench/app/views/projects/_show_data_collections.html.erb
index dc87f04..cd4728e 100644
--- a/apps/workbench/app/views/projects/_show_data_collections.html.erb
+++ b/apps/workbench/app/views/projects/_show_data_collections.html.erb
@@ -1,64 +1,3 @@
-<% if @object.uuid != current_user.uuid # Not the "Home" project %>
-<% content_for :content_top do %>
-
-<h2>
-  <%= render_editable_attribute @object, 'name', nil, { 'data-emptytext' => "New project" } %>
-</h2>
-
-<div class="arv-description-as-subtitle">
-  <%= render_editable_attribute @object, 'description', nil, { 'data-emptytext' => "(No description provided)", 'data-toggle' => 'manual' } %>
-</div>
-
-<% end %>
-<% end %>
-
-<% content_for :tab_line_buttons do %>
-  <% if @object.editable? %>
-    <%= link_to(
-	  choose_collections_path(
-	    title: 'Add data to project:',
-	    multiple: true,
-	    action_name: 'Add',
-	    action_href: actions_path(id: @object.uuid),
-	    action_method: 'post',
-	    action_data: {selection_param: 'selection[]', copy_selections_into_project: @object.uuid, success: 'page-refresh'}.to_json),
-	  { class: "btn btn-primary btn-sm", remote: true, method: 'get', data: {'event-after-select' => 'page-refresh'} }) do %>
-      <i class="fa fa-fw fa-plus"></i> Add data...
-    <% end %>
-    <%= link_to(
-	  choose_pipeline_templates_path(
-	    title: 'Choose a pipeline to run:',
-	    action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
-	    action_href: pipeline_instances_path,
-	    action_method: 'post',
-	    action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => @object.uuid, 'success' => 'redirect-to-created-object'}.to_json),
-	  { class: "btn btn-primary btn-sm", remote: true, method: 'get' }) do %>
-      <i class="fa fa-fw fa-gear"></i> Run a pipeline...
-    <% end %>
-    <%= link_to projects_path('project[owner_uuid]' => @object.uuid), method: 'post', class: 'btn btn-sm btn-primary' do %>
-      <i class="fa fa-fw fa-plus"></i>
-      Add a subproject
-    <% end %>
-    <% if @object.uuid != current_user.uuid # Not the "Home" project %>
-      <%= link_to(
-          choose_projects_path(
-           title: 'Move this project to...',
-           editable: true,
-           my_root_selectable: true,
-           action_name: 'Move',
-           action_href: project_path(@object.uuid),
-           action_method: 'put',
-           action_data: {selection_param: 'project[owner_uuid]', success: 'page-refresh'}.to_json),
-          { class: "btn btn-sm btn-primary arv-move-to-project", remote: true, method: 'get' }) do %>
-        <i class="fa fa-fw fa-truck"></i> Move project...
-      <% end %>
-      <%= link_to(project_path(id: @object.uuid), method: 'delete', class: 'btn btn-sm btn-primary', data: {confirm: "Really delete project '#{@object.name}'?"}) do %>
-        <i class="fa fa-fw fa-trash-o"></i> Delete project
-      <% end %>
-    <% end %>
-  <% end %>
-<% end %>
-
 <%= render_pane 'tab_contents', to_string: true, locals: {
     filters: [['uuid', 'is_a', "arvados#collection"]]
     } %>
diff --git a/apps/workbench/app/views/projects/_show_data_collections.html.erb b/apps/workbench/app/views/projects/show.html.erb
similarity index 95%
copy from apps/workbench/app/views/projects/_show_data_collections.html.erb
copy to apps/workbench/app/views/projects/show.html.erb
index dc87f04..c221ca1 100644
--- a/apps/workbench/app/views/projects/_show_data_collections.html.erb
+++ b/apps/workbench/app/views/projects/show.html.erb
@@ -59,6 +59,4 @@
   <% end %>
 <% end %>
 
-<%= render_pane 'tab_contents', to_string: true, locals: {
-    filters: [['uuid', 'is_a', "arvados#collection"]]
-    } %>
+<%= render file: 'application/show.html.erb', locals: local_assigns %>

commit 3b98ce7a73f94fcf0ccc24bb4b3eac576744cebb
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Aug 11 16:36:12 2014 -0400

    3531: Make test case less confusing.

diff --git a/apps/workbench/test/functional/projects_controller_test.rb b/apps/workbench/test/functional/projects_controller_test.rb
index e8a696b..b3e67bc 100644
--- a/apps/workbench/test/functional/projects_controller_test.rb
+++ b/apps/workbench/test/functional/projects_controller_test.rb
@@ -103,16 +103,23 @@ class ProjectsControllerTest < ActionController::TestCase
     last_kind = nil
     found_kind = {}
     json_response['content'].scan /<tr[^>]+>/ do |tr_tag|
-      assert_equal(1,
-                   (tr_tag.scan(/\ data-object-created-at=\"(.*?)\"/).each do |t,|
-                      if last_timestamp
-                        assert_operator(last_timestamp, :>=, t,
-                                        "Rows are not sorted by timestamp desc")
-                      end
-                      last_timestamp = t
-                    end).count,
+      found_timestamps = 0
+      tr_tag.scan(/\ data-object-created-at=\"(.*?)\"/).each do |t,|
+        if last_timestamp
+          assert_operator(last_timestamp, :>=, t,
+                          "Rows are not sorted by timestamp desc")
+        end
+        last_timestamp = t
+        found_timestamps += 1
+      end
+      assert_equal(1, found_timestamps,
                    "Content row did not have exactly one timestamp")
 
+      # Confirm that the test for timestamp ordering couldn't have
+      # passed merely because the test fixtures have convenient
+      # timestamps (e.g., there is only one pipeline and one job in
+      # the project being tested, or there are no pipelines at all in
+      # the project being tested):
       tr_tag.scan /\ data-kind=\"(.*?)\"/ do |kind|
         if last_kind and last_kind != kind and found_kind[kind]
           # We saw this kind before, then a different kind, then

commit acba0c0caa17d721724533803f797235ab572d94
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Aug 11 16:34:28 2014 -0400

    3531: Add large limit parameter to ensure we get all of the user/group objects
    we want (within reason).

diff --git a/apps/workbench/app/views/projects/_show_sharing.html.erb b/apps/workbench/app/views/projects/_show_sharing.html.erb
index bb652d4..ff0062c 100644
--- a/apps/workbench/app/views/projects/_show_sharing.html.erb
+++ b/apps/workbench/app/views/projects/_show_sharing.html.erb
@@ -2,7 +2,9 @@
    uuid_map = {}
    if @share_links
      [User, Group].each do |type|
-       type.filter([['uuid','in', at share_links.collect(&:tail_uuid)]]).each do |o|
+       type.limit(10000)
+         .filter([['uuid','in', at share_links.collect(&:tail_uuid)]])
+         .each do |o|
          uuid_map[o.uuid] = o
        end
      end

commit c7cf7b6012ecf15264e48af9c7fa4a4e93519a40
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Aug 11 16:20:51 2014 -0400

    3531: Dry up tab pane rendering. Fix copy-and-paste error on tab_name.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index ae94dac..d472422 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -132,9 +132,7 @@ class ApplicationController < ActionController::Base
       f.json { render json: @objects }
       f.html {
         if params['tab_pane']
-          comparable = self.respond_to? :compare
-          render(partial: 'show_' + params['tab_pane'].downcase,
-                 locals: { comparable: comparable, objects: @objects })
+          render_pane params['tab_pane']
         else
           render
         end
@@ -143,6 +141,23 @@ class ApplicationController < ActionController::Base
     end
   end
 
+  helper_method :render_pane
+  def render_pane tab_pane, opts={}
+    render_opts = {
+      partial: 'show_' + tab_pane.downcase,
+      locals: {
+        comparable: self.respond_to?(:compare),
+        objects: @objects,
+        tab_pane: tab_pane
+      }.merge(opts[:locals] || {})
+    }
+    if opts[:to_string]
+      render_to_string render_opts
+    else
+      render render_opts
+    end
+  end
+
   def index
     find_objects_for_index if !@objects
     render_index
@@ -180,9 +195,7 @@ class ApplicationController < ActionController::Base
       f.json { render json: @object.attributes.merge(href: url_for(@object)) }
       f.html {
         if params['tab_pane']
-          comparable = self.respond_to? :compare
-          render(partial: 'show_' + params['tab_pane'].downcase,
-                 locals: { comparable: comparable, objects: @objects })
+          render_pane params['tab_pane']
         elsif request.method.in? ['GET', 'HEAD']
           render
         else
diff --git a/apps/workbench/app/views/application/_content.html.erb b/apps/workbench/app/views/application/_content.html.erb
index 776787b..f7ae909 100644
--- a/apps/workbench/app/views/application/_content.html.erb
+++ b/apps/workbench/app/views/application/_content.html.erb
@@ -21,8 +21,7 @@
     <div id="<%= pane %>-scroll" style="margin-top:0.5em;">
       <div class="pane-content">
         <% if i == 0 %>
-          <%= render(partial: 'show_' + pane.downcase,
-                     locals: { comparable: comparable, objects: @objects }) %>
+          <%= render_pane pane, to_string: true %>
         <% else %>
           <div class="spinner spinner-32px spinner-h-center"></div>
         <% end %>
diff --git a/apps/workbench/app/views/projects/_show_data_collections.html.erb b/apps/workbench/app/views/projects/_show_data_collections.html.erb
index 26a8c93..dc87f04 100644
--- a/apps/workbench/app/views/projects/_show_data_collections.html.erb
+++ b/apps/workbench/app/views/projects/_show_data_collections.html.erb
@@ -59,7 +59,6 @@
   <% end %>
 <% end %>
 
-<%= render partial: 'show_tab_contents', locals: {
-    filters: [['uuid', 'is_a', "arvados#collection"]],
-    tab_name: 'Data_collections'
+<%= render_pane 'tab_contents', to_string: true, locals: {
+    filters: [['uuid', 'is_a', "arvados#collection"]]
     } %>
diff --git a/apps/workbench/app/views/projects/_show_jobs_and_pipelines.html.erb b/apps/workbench/app/views/projects/_show_jobs_and_pipelines.html.erb
index f2e0275..02a84c3 100644
--- a/apps/workbench/app/views/projects/_show_jobs_and_pipelines.html.erb
+++ b/apps/workbench/app/views/projects/_show_jobs_and_pipelines.html.erb
@@ -1,4 +1,3 @@
-<%= render partial: 'show_tab_contents', locals: {
-    filters: [['uuid', 'is_a', ["arvados#job", "arvados#pipelineInstance"]]],
-    tab_name: 'Data_collections'
+<%= render_pane 'tab_contents', to_string: true, locals: {
+    filters: [['uuid', 'is_a', ["arvados#job", "arvados#pipelineInstance"]]]
     } %>
diff --git a/apps/workbench/app/views/projects/_show_other_objects.html.erb b/apps/workbench/app/views/projects/_show_other_objects.html.erb
index 41420a5..f0da35d 100644
--- a/apps/workbench/app/views/projects/_show_other_objects.html.erb
+++ b/apps/workbench/app/views/projects/_show_other_objects.html.erb
@@ -1,4 +1,3 @@
-<%= render partial: 'show_tab_contents', locals: {
-    filters: [['uuid', 'is_a', ["arvados#human", "arvados#specimen", "arvados#trait"]]],
-    tab_name: 'Data_collections'
+<%= render_pane 'tab_contents', to_string: true, locals: {
+    filters: [['uuid', 'is_a', ["arvados#human", "arvados#specimen", "arvados#trait"]]]
     } %>
diff --git a/apps/workbench/app/views/projects/_show_pipeline_templates.html.erb b/apps/workbench/app/views/projects/_show_pipeline_templates.html.erb
index c54e28d..df2d6b6 100644
--- a/apps/workbench/app/views/projects/_show_pipeline_templates.html.erb
+++ b/apps/workbench/app/views/projects/_show_pipeline_templates.html.erb
@@ -1,8 +1,3 @@
-<%
-  filters = [['uuid', 'is_a', "arvados#pipelineTemplate"]]
-  @objects = @object.contents({limit: 50, include_linked: true, :filters => filters})
-  objects_and_names = get_objects_and_names @objects
-  page_offset = next_page_offset @objects
-%>
-
-<%= render partial: 'show_tab_contents', locals: {project: @object, objects_and_names: objects_and_names, filters: filters, page_offset: page_offset, tab_name: 'Pipeline_templates'} %>
+<%= render_pane 'tab_contents', to_string: true, locals: {
+    filters: [['uuid', 'is_a', ["arvados#pipelineTemplate"]]]
+    } %>
diff --git a/apps/workbench/app/views/projects/_show_subprojects.html.erb b/apps/workbench/app/views/projects/_show_subprojects.html.erb
index 640aee1..2aa2364 100644
--- a/apps/workbench/app/views/projects/_show_subprojects.html.erb
+++ b/apps/workbench/app/views/projects/_show_subprojects.html.erb
@@ -1,4 +1,3 @@
-<%= render partial: 'show_tab_contents', locals: {
-    filters: [['uuid', 'is_a', ["arvados#group"]]],
-    tab_name: 'Data_collections'
+<%= render_pane 'tab_contents', to_string: true, locals: {
+    filters: [['uuid', 'is_a', ["arvados#group"]]]
     } %>
diff --git a/apps/workbench/app/views/projects/_show_tab_contents.html.erb b/apps/workbench/app/views/projects/_show_tab_contents.html.erb
index 4d19cbd..c9c4dc0 100644
--- a/apps/workbench/app/views/projects/_show_tab_contents.html.erb
+++ b/apps/workbench/app/views/projects/_show_tab_contents.html.erb
@@ -33,16 +33,16 @@
       </div>
     </div>
     <div class="col-sm-4 pull-right">
-      <input type="text" class="form-control filterable-control" placeholder="Search project contents" data-filterable-target="table.arv-index.arv-project-<%= tab_name %> tbody"/>
+      <input type="text" class="form-control filterable-control" placeholder="Search project contents" data-filterable-target="table.arv-index.arv-project-<%= tab_pane %> tbody"/>
     </div>
   </div>
 
-  <table class="table table-condensed table-fixedlayout arv-index arv-project-<%= tab_name %>" style="overflow-x: hidden">
+  <table class="table table-condensed table-fixedlayout arv-index arv-project-<%= tab_pane %>" style="overflow-x: hidden">
     <colgroup>
       <col width="40%" />
       <col width="60%" />
     </colgroup>
-    <tbody data-infinite-scroller="#<%= tab_name %>-scroll" data-infinite-content-href="<%= url_for partial: :contents_rows, filters: filters.to_json %>">
+    <tbody data-infinite-scroller="#<%= tab_pane %>-scroll" data-infinite-content-href="<%= url_for partial: :contents_rows, filters: filters.to_json %>">
     </tbody>
     <thead>
       <tr>

commit 9b5c87a043b10e1d983ec1c7e8b7784e5b79c5ae
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Aug 11 15:20:20 2014 -0400

    3531: Do not assume order is always descending.

diff --git a/apps/workbench/app/controllers/projects_controller.rb b/apps/workbench/app/controllers/projects_controller.rb
index 4434861..1ab54d2 100644
--- a/apps/workbench/app/controllers/projects_controller.rb
+++ b/apps/workbench/app/controllers/projects_controller.rb
@@ -132,12 +132,13 @@ class ProjectsController < ApplicationController
     kind_filters = @filters.select do |attr,op,val|
       op == 'is_a' and val.is_a? Array and val.count > 1
     end
-    if /^created_at/ =~ @order[0] and kind_filters.count == 1
+    if /^created_at\b/ =~ @order[0] and kind_filters.count == 1
       # If filtering on multiple types and sorting by date: Get the
       # first page of each type, sort the entire set, truncate to one
       # page, and use the last item on this page as a filter for
       # retrieving the next page. Ideally the API would do this for
       # us, but it doesn't (yet).
+      nextpage_operator = /\bdesc/i =~ @order[0] ? '<' : '>'
       @objects = []
       @name_link_for = {}
       kind_filters.each do |attr,op,val|
@@ -155,10 +156,12 @@ class ProjectsController < ApplicationController
       end
       @objects = @objects.to_a.sort_by(&:created_at).reverse[0.. at limit-1]
       @next_page_filters = @filters.reject do |attr,op,val|
-        attr == 'created_at' and op == '<'
+        attr == 'created_at' and op == nextpage_operator
       end
       if @objects.any?
-        @next_page_filters += [['created_at', '<', @objects.last.created_at]]
+        @next_page_filters += [['created_at',
+                                nextpage_operator,
+                                @objects.last.created_at]]
         @next_page_href = url_for(partial: :contents_rows,
                                   filters: @next_page_filters.to_json)
       else

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list