4285: prepend './' to file path being retrieved when it is in a subdir in a collection.
[arvados.git] / apps / workbench / app / controllers / jobs_controller.rb
index 841d3a9fdc6827486a7f54948e6c63ee4b3b5b1a..40f4378544cb7c38ee659a3055874bed8f9cb533 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,6 +27,7 @@ class JobsController < ApplicationController
     if params[:uuid]
       @objects = Job.where(uuid: params[:uuid])
       generate_provenance(@objects)
+      render_index
     else
       @limit = 20
       super
@@ -33,11 +36,16 @@ class JobsController < ApplicationController
 
   def cancel
     @object.cancel
-    redirect_to @object
+    if params[:return_to]
+      redirect_to params[:return_to]
+    else
+      redirect_to @object
+    end
   end
 
   def show
     generate_provenance([@object])
+    super
   end
 
   def index_pane_list
@@ -49,6 +57,6 @@ class JobsController < ApplicationController
   end
 
   def show_pane_list
-    %w(Status Attributes Provenance Metadata JSON API)
+    %w(Status Log Details Provenance Advanced)
   end
 end