X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a942e37250873d383bd885ba0dba70c63b3c073d..2873926cdbfc8012b276db11d24cea3ad6a4bdd4:/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 df14f4ede6..89acbb0dbb 100644 --- a/apps/workbench/app/models/pipeline_instance.rb +++ b/apps/workbench/app/models/pipeline_instance.rb @@ -5,6 +5,20 @@ class PipelineInstance < ArvadosBase true end + def friendly_link_name + pipeline_name = self.name + if pipeline_name.nil? or pipeline_name.empty? + template = PipelineTemplate.where(uuid: self.pipeline_template_uuid).first + if template + template.name + else + self.uuid + end + else + pipeline_name + end + end + def content_summary begin PipelineTemplate.find(pipeline_template_uuid).name @@ -30,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 @@ -53,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