[ARVADOS] updated: b917e8a2ebf8c51729ecde1d3cc3396d2fcf0034
git at public.curoverse.com
git at public.curoverse.com
Fri Nov 7 09:23:24 EST 2014
Summary of changes:
.../app/controllers/application_controller.rb | 33 ++++++++++++-----
.../views/pipeline_instances/_show_recent.html.erb | 42 ++-------------------
..._recent.html.erb => _show_recent_rows.html.erb} | 43 +---------------------
3 files changed, 27 insertions(+), 91 deletions(-)
copy apps/workbench/app/views/pipeline_instances/{_show_recent.html.erb => _show_recent_rows.html.erb} (61%)
via b917e8a2ebf8c51729ecde1d3cc3396d2fcf0034 (commit)
from a0ff04290d85b5608211b1fd3ccb00c2e0758503 (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 b917e8a2ebf8c51729ecde1d3cc3396d2fcf0034
Author: radhika <radhika at curoverse.com>
Date: Fri Nov 7 09:06:09 2014 -0500
4024: add infinite scrolling to pipeline_instances page.
diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 751b494..833294b 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -167,16 +167,29 @@ class ApplicationController < ActionController::Base
end
def render_index
- respond_to do |f|
- f.json { render json: @objects }
- f.html {
- if params[:tab_pane]
- render_pane params[:tab_pane]
- else
- render
- end
- }
- f.js { render }
+ if params[:partial]
+ respond_to do |f|
+ f.json {
+ @next_page_href = next_page_href(partial: params[:partial])
+ render json: {
+ content: render_to_string(partial: "show_#{params[:partial]}.html", formats: [:html]),
+ next_page_href: @next_page_href
+
+ }
+ }
+ end
+ else
+ respond_to do |f|
+ f.json { render json: @objects }
+ f.html {
+ if params[:tab_pane]
+ render_pane params[:tab_pane]
+ else
+ render
+ end
+ }
+ f.js { render }
+ end
end
end
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 f918e24..cc4b957 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
@@ -1,5 +1,3 @@
-<%= render partial: "paging", locals: {results: @objects, object: @object} %>
-
<%= form_tag do |f| %>
<table class="table table-condensed table-fixedlayout">
@@ -29,45 +27,11 @@
</th>
</tr>
</thead>
- <tbody>
-
- <% @objects.sort_by { |ob| ob.created_at }.reverse.each do |ob| %>
-
- <tr data-object-uuid="<%= ob.uuid %>">
- <td>
- <%= check_box_tag 'uuids[]', ob.uuid, false, :class => 'persistent-selection' %>
- </td><td>
- <%= render partial: 'pipeline_status_label', locals: {:p => ob} %>
- </td><td colspan="1">
- <%= link_to_if_arvados_object ob, friendly_name: true %>
- </td><td>
- <%= link_to_if_arvados_object ob.pipeline_template_uuid, friendly_name: true %>
- </td><td>
- <%= link_to_if_arvados_object ob.owner_uuid, friendly_name: true %>
- </td><td>
- <%= ob.created_at.to_s %>
- </td><td>
- <%= render partial: 'delete_object_button', locals: {object:ob} %>
- </td>
- </tr>
- <tr data-object-uuid="<%= ob.uuid %>">
- <td style="border-top: 0;" colspan="2">
- </td>
- <td style="border-top: 0; opacity: 0.5;" colspan="6">
- <% ob.components.each do |cname, c| %>
- <% if c.is_a?(Hash) and c[:job] %>
- <%= render partial: "job_progress", locals: {:j => c[:job], :title => cname.to_s, :show_progress_bar => false } %>
- <% else %>
- <span class="label label-default"><%= cname.to_s %></span>
- <% end %>
- <% end %>
- </td>
- </tr>
- <% end %>
+ <tbody data-infinite-scroller="recent-pipeline-instances-scroll"
+ data-infinite-content-href="<%= url_for partial: :recent_rows %>" >
</tbody>
+
</table>
<% end %>
-
-<%= render partial: "paging", locals: {results: @objects, object: @object} %>
diff --git a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb b/apps/workbench/app/views/pipeline_instances/_show_recent_rows.html.erb
similarity index 61%
copy from apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
copy to apps/workbench/app/views/pipeline_instances/_show_recent_rows.html.erb
index f918e24..e8406dc 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_recent.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_recent_rows.html.erb
@@ -1,38 +1,4 @@
-<%= render partial: "paging", locals: {results: @objects, object: @object} %>
-
-<%= form_tag do |f| %>
-
-<table class="table table-condensed table-fixedlayout">
- <colgroup>
- <col width="5%" />
- <col width="15%" />
- <col width="25%" />
- <col width="20%" />
- <col width="15%" />
- <col width="15%" />
- <col width="5%" />
- </colgroup>
- <thead>
- <tr class="contain-align-left">
- <th>
- </th><th>
- Status
- </th><th>
- Instance
- </th><th>
- Template
- </th><th>
- Owner
- </th><th>
- Created at
- </th><th>
- </th>
- </tr>
- </thead>
- <tbody>
-
- <% @objects.sort_by { |ob| ob.created_at }.reverse.each do |ob| %>
-
+<% @objects.sort_by { |ob| ob.created_at }.reverse.each do |ob| %>
<tr data-object-uuid="<%= ob.uuid %>">
<td>
<%= check_box_tag 'uuids[]', ob.uuid, false, :class => 'persistent-selection' %>
@@ -63,11 +29,4 @@
<% end %>
</td>
</tr>
- <% end %>
-
- </tbody>
-</table>
-
<% end %>
-
-<%= render partial: "paging", locals: {results: @objects, object: @object} %>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list