1 class WorkUnitTemplatesController < ApplicationController
2 def find_objects_for_index
3 return if !params[:partial]
6 @filters = @filters || []
8 # get next page of pipeline_templates
9 filters = @filters + [["uuid", "is_a", ["arvados#pipelineTemplate"]]]
10 pipelines = PipelineTemplate.limit(@limit).order(["created_at desc"]).filter(filters)
12 # get next page of workflows
13 filters = @filters + [["uuid", "is_a", ["arvados#workflow"]]]
14 workflows = Workflow.limit(@limit).order(["created_at desc"]).filter(filters)
16 @objects = (pipelines.to_a + workflows.to_a).sort_by(&:created_at).reverse.first(@limit)
19 @next_page_filters = next_page_filters('<=')
20 @next_page_href = url_for(partial: :choose_rows,
21 filters: @next_page_filters.to_json)
27 def next_page_href with_params={}