1 class JobsController < ApplicationController
2 skip_around_filter :require_thread_api_token, if: proc { |ctrl|
3 Rails.configuration.anonymous_user_token and
4 'show' == ctrl.action_name
7 def generate_provenance(jobs)
8 return if params['tab_pane'] != "Provenance"
16 ProvenanceHelper::find_collections(j[:script_parameters]) do |hash, uuid|
17 collections << uuid if uuid
18 hashes << hash if hash
20 nodes[j[:script_version]] = {:uuid => j[:script_version]}
23 Collection.where(uuid: collections).each do |c|
24 nodes[c[:portable_data_hash]] = c
27 Collection.where(portable_data_hash: hashes).each do |c|
28 nodes[c[:portable_data_hash]] = c
31 @svg = ProvenanceHelper::create_provenance_graph nodes, "provenance_svg", {
33 :all_script_parameters => true,
34 :script_version_nodes => true}
40 @objects = Job.where(uuid: params[:uuid])
41 generate_provenance(@objects)
52 redirect_to params[:return_to]
59 generate_provenance([@object])
65 stderr_log_query(Rails.configuration.running_job_log_records_to_fetch).
66 map { |e| e.serializable_hash.merge({ 'prepend' => true }) }
67 respond_to do |format|
68 format.json { render json: @logs }
81 %w(Status Log Details Provenance Advanced)