1 class JobsController < ApplicationController
3 def generate_provenance(jobs)
4 return if params['tab_pane'] != "Provenance"
12 ProvenanceHelper::find_collections(j[:script_parameters]) do |hash, uuid|
13 collections << uuid if uuid
14 hashes << hash if hash
16 nodes[j[:script_version]] = {:uuid => j[:script_version]}
19 Collection.where(uuid: collections).each do |c|
20 nodes[c[:portable_data_hash]] = c
23 Collection.where(portable_data_hash: hashes).each do |c|
24 nodes[c[:portable_data_hash]] = c
27 @svg = ProvenanceHelper::create_provenance_graph nodes, "provenance_svg", {
29 :all_script_parameters => true,
30 :script_version_nodes => true}
36 @objects = Job.where(uuid: params[:uuid])
37 generate_provenance(@objects)
48 redirect_to params[:return_to]
55 generate_provenance([@object])
68 %w(Status Log Details Provenance Advanced)