20259: Add documentation for banner and tooltip features
[arvados.git] / apps / workbench / app / controllers / jobs_controller.rb
index e38d3ba87b3e40e6df08e4d6150a2a3c392220a7..e5c71cb275ed19b21b5db637d49fe7e356b64aea 100644 (file)
@@ -4,7 +4,7 @@
 
 class JobsController < ApplicationController
   skip_around_action :require_thread_api_token, if: proc { |ctrl|
-    Rails.configuration.anonymous_user_token and
+    !Rails.configuration.Users.AnonymousUserToken.empty? and
     'show' == ctrl.action_name
   }
 
@@ -24,17 +24,16 @@ class JobsController < ApplicationController
       nodes[j[:script_version]] = {:uuid => j[:script_version]}
     end
 
-    Collection.where(uuid: collections).each do |c|
+    Collection.where(uuid: collections).with_count("none").each do |c|
       nodes[c[:portable_data_hash]] = c
     end
 
-    Collection.where(portable_data_hash: hashes).each do |c|
+    Collection.where(portable_data_hash: hashes).with_count("none").each do |c|
       nodes[c[:portable_data_hash]] = c
     end
 
     @svg = ProvenanceHelper::create_provenance_graph nodes, "provenance_svg", {
       :request => request,
-      :direction => :top_down,
       :all_script_parameters => true,
       :script_version_nodes => true}
   end
@@ -67,7 +66,7 @@ class JobsController < ApplicationController
 
   def logs
     @logs = @object.
-      stderr_log_query(Rails.configuration.running_job_log_records_to_fetch).
+      stderr_log_query(Rails.configuration.Workbench.RunningJobLogRecordsToFetch).
       map { |e| e.serializable_hash.merge({ 'prepend' => true }) }
     respond_to do |format|
       format.json { render json: @logs }