X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a59152e34814f453a7380e68a55534e2f8922d57..6d3636939f60a96d8ede920fec474079d713c7e1:/apps/workbench/app/models/pipeline_instance.rb diff --git a/apps/workbench/app/models/pipeline_instance.rb b/apps/workbench/app/models/pipeline_instance.rb index 7fe88c62a8..c3b14755f3 100644 --- a/apps/workbench/app/models/pipeline_instance.rb +++ b/apps/workbench/app/models/pipeline_instance.rb @@ -1,6 +1,18 @@ -class PipelineInstance < OrvosBase +class PipelineInstance < ArvadosBase attr_accessor :pipeline_template + def self.goes_in_projects? + true + end + + def content_summary + begin + PipelineTemplate.find(pipeline_template_uuid).name + rescue + super + end + end + def update_job_parameters(new_params) self.components[:steps].each_with_index do |step, i| step[:params].each do |param| @@ -16,4 +28,18 @@ class PipelineInstance < OrvosBase end end end + + def attribute_editable? attr, *args + super && (attr.to_sym == :name || + (attr.to_sym == :components and + (self.state == 'New' || self.state == 'Ready'))) + end + + def attributes_for_display + super.reject { |k,v| k == 'components' } + end + + def self.creatable? + false + end end