Merge branch '3605-node-info-field' refs #3605
[arvados.git] / apps / workbench / app / controllers / pipeline_instances_controller.rb
index e84d0e45975c7207386cb46fb2d43e71534bda5d..9b31912a48619f26454e85e479eca107b877225c 100644 (file)
@@ -2,6 +2,7 @@ class PipelineInstancesController < ApplicationController
   skip_before_filter :find_object_by_uuid, only: :compare
   before_filter :find_objects_by_uuid, only: :compare
   include PipelineInstancesHelper
+  include PipelineComponentsHelper
 
   def copy
     @object = @object.dup
@@ -53,12 +54,6 @@ class PipelineInstancesController < ApplicationController
       p.components.each do |k, v|
         j = v[:job] || next
 
-        # The graph is interested in whether the component is
-        # indicated as persistent, more than whether the job
-        # satisfying it (which could have been reused, or someone
-        # else's) is.
-        j[:output_is_persistent] = v[:output_is_persistent]
-
         uuid = j[:uuid].intern
         provenance[uuid] = j
         pips[uuid] = 0 unless pips[uuid] != nil
@@ -192,11 +187,11 @@ class PipelineInstancesController < ApplicationController
   end
 
   def show_pane_list
-    panes = %w(Components Graph Advanced)
+    panes = %w(Components Log Graph Advanced)
     if @object and @object.state.in? ['New', 'Ready']
-      panes = %w(Inputs) + panes
+      panes = %w(Inputs) + panes - %w(Log)
     end
-    if not @object.components.values.collect { |x| x[:job] }.compact.any?
+    if not @object.components.values.any? { |x| x[:job] rescue false }
       panes -= ['Graph']
     end
     panes