2872: Merge branch 'master' into 2872-folder-nav
[arvados.git] / apps / workbench / app / models / pipeline_instance.rb
index 45e472fae923077bf850727272ed412193747a06..c3b14755f3fb6f8dbdf77d3630e689797cca8eea 100644 (file)
@@ -1,6 +1,18 @@
 class PipelineInstance < ArvadosBase
   attr_accessor :pipeline_template
 
+  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|
@@ -17,9 +29,10 @@ class PipelineInstance < ArvadosBase
     end
   end
   
-  def attribute_editable?(attr)
-    attr && (attr.to_sym == :name ||
-            (attr.to_sym == :components and (self.state == 'New' || self.state == 'Ready')))
+  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