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 if PipelineTemplate.api_exists?(:index)
10 filters = @filters + [["uuid", "is_a", ["arvados#pipelineTemplate"]]]
11 pipelines = PipelineTemplate.limit(@limit).order(["created_at desc"]).filter(filters)
14 # get next page of workflows
15 filters = @filters + [["uuid", "is_a", ["arvados#workflow"]]]
16 workflows = Workflow.limit(@limit).order(["created_at desc"]).filter(filters)
18 @objects = (pipelines.to_a + workflows.to_a).sort_by(&:created_at).reverse.first(@limit)
21 @next_page_filters = next_page_filters('<=')
22 @next_page_href = url_for(partial: :choose_rows,
23 filters: @next_page_filters.to_json)
29 def next_page_href with_params={}