Merge branch 'master' into 3296-user-profile
[arvados.git] / apps / workbench / app / controllers / jobs_controller.rb
index f693fa6428fde5ee5899ab6a4758b4120bb1adb2..b3204bf64e8d52cd3aa9d31315e0129225ef339d 100644 (file)
@@ -1,6 +1,8 @@
 class JobsController < ApplicationController
 
   def generate_provenance(jobs)
+    return if params['tab_pane'] != "Provenance"
+
     nodes = []
     collections = []
     jobs.each do |j|
@@ -25,14 +27,21 @@ class JobsController < ApplicationController
     if params[:uuid]
       @objects = Job.where(uuid: params[:uuid])
       generate_provenance(@objects)
+      render_index
     else
       @limit = 20
       super
     end
   end
 
+  def cancel
+    @object.cancel
+    redirect_to @object
+  end
+
   def show
     generate_provenance([@object])
+    super
   end
 
   def index_pane_list
@@ -44,6 +53,6 @@ class JobsController < ApplicationController
   end
 
   def show_pane_list
-    %w(Status Attributes Provenance Metadata JSON API)
+    %w(Status Log Details Provenance Advanced)
   end
 end