3531: Refactor project tab infinite-scroll. Sort jobs and pipelines
[arvados.git] / apps / workbench / app / models / pipeline_instance.rb
index c9538d158c623051fe4c8a73b7783e041cf30494..fa9fab68eb6e149ecef2e062ff332aa9a6f42fd4 100644 (file)
@@ -1,7 +1,7 @@
 class PipelineInstance < ArvadosBase
   attr_accessor :pipeline_template
 
-  def self.goes_in_folders?
+  def self.goes_in_projects?
     true
   end
 
@@ -28,7 +28,7 @@ class PipelineInstance < ArvadosBase
       end
     end
   end
-  
+
   def attribute_editable? attr, *args
     super && (attr.to_sym == :name ||
               (attr.to_sym == :components and
@@ -42,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