Merge branch '10484-count-clients' closes #10484
[arvados.git] / apps / workbench / app / helpers / pipeline_components_helper.rb
1 module PipelineComponentsHelper
2   def render_pipeline_components(template_suffix, fallback=nil, locals={})
3     begin
4       render(partial: "pipeline_instances/show_components_#{template_suffix}",
5              locals: locals)
6     rescue => e
7       logger.error "#{e.inspect}"
8       logger.error "#{e.backtrace.join("\n\t")}"
9       case fallback
10       when :json
11         render(partial: "pipeline_instances/show_components_json",
12                locals: {error_name: e.inspect, backtrace: e.backtrace.join("\n\t")})
13       end
14     end
15   end
16 end