X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/854060d1005f013784fe935a4d8bd7ff5fc1c2e3..4c8ec1b2166a81b05b2b6cf5a6fae5b839876802:/apps/workbench/app/models/pipeline_instance.rb?ds=sidebyside diff --git a/apps/workbench/app/models/pipeline_instance.rb b/apps/workbench/app/models/pipeline_instance.rb index d0b4dcdb6b..89acbb0dbb 100644 --- a/apps/workbench/app/models/pipeline_instance.rb +++ b/apps/workbench/app/models/pipeline_instance.rb @@ -9,7 +9,11 @@ class PipelineInstance < ArvadosBase pipeline_name = self.name if pipeline_name.nil? or pipeline_name.empty? template = PipelineTemplate.where(uuid: self.pipeline_template_uuid).first - template.name if template else self.uuid + if template + template.name + else + self.uuid + end else pipeline_name end @@ -40,7 +44,7 @@ class PipelineInstance < ArvadosBase end def attribute_editable? attr, *args - super && (attr.to_sym == :name || + super && (attr.to_sym == :name || attr.to_sym == :description || (attr.to_sym == :components and (self.state == 'New' || self.state == 'Ready'))) end @@ -63,4 +67,8 @@ class PipelineInstance < ArvadosBase "\"#{input_name.to_s}\" parameter for #{component[:script]} script in #{component_name} component" end end + + def textile_attributes + [ 'description' ] + end end