Merge branch '3859-crunch-job-use-lock' closes #3859
[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 Exception => 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