3354: Merge branch 'master' into 3354-render-textile
[arvados.git] / apps / workbench / app / controllers / pipeline_instances_controller.rb
index e84d0e45975c7207386cb46fb2d43e71534bda5d..f1e3634d5e9c8c76abbd972fbfc109fcd5aefa34 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
@@ -192,11 +193,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