X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/436d545670d3637dcd96b429e538b995ee98a49b..e5337814593c504ef71e9f517dc1d99d41e19784:/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 5a88003f82..fa9fab68eb 100644 --- a/apps/workbench/app/models/pipeline_instance.rb +++ b/apps/workbench/app/models/pipeline_instance.rb @@ -1,10 +1,18 @@ class PipelineInstance < ArvadosBase attr_accessor :pipeline_template - def self.goes_in_folders? + 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| @@ -20,7 +28,7 @@ class PipelineInstance < ArvadosBase end end end - + def attribute_editable? attr, *args super && (attr.to_sym == :name || (attr.to_sym == :components and @@ -34,4 +42,11 @@ class PipelineInstance < ArvadosBase def self.creatable? false end + + def component_input_title(component_name, input_name) + component = components[component_name] + return nil if component.nil? + component[:script_parameters].andand[input_name.to_sym].andand[:title] || + "\"#{input_name.to_s}\" parameter for #{component[:script]} script in #{component_name} component" + end end