2756: store websocket in window to facilitate reuse within page. also, remove element...
[arvados.git] / apps / workbench / app / models / pipeline_instance.rb
index 7fe88c62a8b0a28b02664d0aa2984dcf96d7b328..45e472fae923077bf850727272ed412193747a06 100644 (file)
@@ -1,4 +1,4 @@
-class PipelineInstance < OrvosBase
+class PipelineInstance < ArvadosBase
   attr_accessor :pipeline_template
 
   def update_job_parameters(new_params)
@@ -16,4 +16,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