2760: Exclude system objects like VMs and repos from folder behavior.
[arvados.git] / apps / workbench / app / models / pipeline_instance.rb
index 7fe88c62a8b0a28b02664d0aa2984dcf96d7b328..aad7cfc4cc9858e837505cc85f7eb5a5a118c212 100644 (file)
@@ -1,6 +1,10 @@
-class PipelineInstance < OrvosBase
+class PipelineInstance < ArvadosBase
   attr_accessor :pipeline_template
 
+  def self.goes_in_folders?
+    true
+  end
+
   def update_job_parameters(new_params)
     self.components[:steps].each_with_index do |step, i|
       step[:params].each do |param|
@@ -16,4 +20,17 @@ class PipelineInstance < OrvosBase
       end
     end
   end
+  
+  def attribute_editable?(attr)
+    attr && (attr.to_sym == :name ||
+            (attr.to_sym == :components and (self.state == 'New' || self.state == 'Ready')))
+  end
+
+  def attributes_for_display
+    super.reject { |k,v| k == 'components' }
+  end
+
+  def self.creatable?
+    false
+  end
 end