3149: Do not preload results in search dialog. Let infinite scroll do it.
[arvados.git] / apps / workbench / app / controllers / jobs_controller.rb
index 9de82d82f950dfc8f5bf32846e9cb31ef059eb1b..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,10 +27,16 @@ class JobsController < ApplicationController
     if params[:uuid]
       @objects = Job.where(uuid: params[:uuid])
       generate_provenance(@objects)
+      render_index
     else
       @limit = 20
+      super
     end
-    super
+  end
+
+  def cancel
+    @object.cancel
+    redirect_to @object
   end
 
   def show
@@ -45,6 +53,6 @@ class JobsController < ApplicationController
   end
 
   def show_pane_list
-    %w(Attributes Provenance Metadata JSON API)
+    %w(Status Log Details Provenance Advanced)
   end
 end