1 class PipelineInstance < ArvadosBase
2 attr_accessor :pipeline_template
4 def self.goes_in_folders?
8 def update_job_parameters(new_params)
9 self.components[:steps].each_with_index do |step, i|
10 step[:params].each do |param|
11 if new_params.has_key?(new_param_name = "#{i}/#{param[:name]}") or
12 new_params.has_key?(new_param_name = "#{step[:name]}/#{param[:name]}") or
13 new_params.has_key?(new_param_name = param[:name])
15 %w(hash data_locator).collect(&:to_sym).each do |ptype|
16 param_type = ptype if param.has_key? ptype
18 param[param_type] = new_params[new_param_name]
24 def attribute_editable?(attr)
25 attr && (attr.to_sym == :name ||
26 (attr.to_sym == :components and (self.state == 'New' || self.state == 'Ready')))
29 def attributes_for_display
30 super.reject { |k,v| k == 'components' }