X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b76f2e97b6f2efbe5e524776a6b6a53bbad43448..0b4f867ef14af38c07b910643fbe8cc6a93e6bb6:/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 81cd42bf46..5a88003f82 100644 --- a/apps/workbench/app/models/pipeline_instance.rb +++ b/apps/workbench/app/models/pipeline_instance.rb @@ -1,6 +1,10 @@ class PipelineInstance < ArvadosBase attr_accessor :pipeline_template + def self.goes_in_folders? + true + end + def update_job_parameters(new_params) self.components[:steps].each_with_index do |step, i| step[:params].each do |param| @@ -16,8 +20,18 @@ class PipelineInstance < ArvadosBase 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 attribute_editable?(attr) - attr == 'name' + def self.creatable? + false end end