20690: Remove workbench1 and testing/packaging references.
[arvados.git] / apps / workbench / app / controllers / jobs_controller.rb
diff --git a/apps/workbench/app/controllers/jobs_controller.rb b/apps/workbench/app/controllers/jobs_controller.rb
deleted file mode 100644 (file)
index e5c71cb..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-class JobsController < ApplicationController
-  skip_around_action :require_thread_api_token, if: proc { |ctrl|
-    !Rails.configuration.Users.AnonymousUserToken.empty? and
-    'show' == ctrl.action_name
-  }
-
-  def generate_provenance(jobs)
-    return if params['tab_pane'] != "Provenance"
-
-    nodes = {}
-    collections = []
-    hashes = []
-    jobs.each do |j|
-      nodes[j[:uuid]] = j
-      hashes << j[:output]
-      ProvenanceHelper::find_collections(j[:script_parameters]) do |hash, uuid|
-        collections << uuid if uuid
-        hashes << hash if hash
-      end
-      nodes[j[:script_version]] = {:uuid => j[:script_version]}
-    end
-
-    Collection.where(uuid: collections).with_count("none").each do |c|
-      nodes[c[:portable_data_hash]] = c
-    end
-
-    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,
-      :all_script_parameters => true,
-      :script_version_nodes => true}
-  end
-
-  def index
-    @svg = ""
-    if params[:uuid]
-      @objects = Job.where(uuid: params[:uuid])
-      generate_provenance(@objects)
-      render_index
-    else
-      @limit = 20
-      super
-    end
-  end
-
-  def cancel
-    @object.cancel
-    if params[:return_to]
-      redirect_to params[:return_to]
-    else
-      redirect_to @object
-    end
-  end
-
-  def show
-    generate_provenance([@object])
-    super
-  end
-
-  def logs
-    @logs = @object.
-      stderr_log_query(Rails.configuration.Workbench.RunningJobLogRecordsToFetch).
-      map { |e| e.serializable_hash.merge({ 'prepend' => true }) }
-    respond_to do |format|
-      format.json { render json: @logs }
-    end
-  end
-
-  def index_pane_list
-    if params[:uuid]
-      %w(Recent Provenance)
-    else
-      %w(Recent)
-    end
-  end
-
-  def show_pane_list
-    %w(Status Log Details Provenance Advanced)
-  end
-end