10111: Skip log outputs from the provenance graph.
authorLucas Di Pentima <lucas@curoverse.com>
Thu, 4 May 2017 15:42:19 +0000 (12:42 -0300)
committerLucas Di Pentima <lucas@curoverse.com>
Thu, 4 May 2017 15:42:19 +0000 (12:42 -0300)
Container request's outputs are now added to the graph by their PDHs so that they connect with the CR childs inputs.

apps/workbench/app/helpers/provenance_helper.rb

index 44acc18a019759342f94c15c3e1bafd9207be758..62bf7f3a530bff82ce45a8c8de682383a63f40f0 100644 (file)
@@ -122,13 +122,12 @@ module ProvenanceHelper
         end
       end
 
-      [
-        [:output_uuid, 'output'],
-        [:log_uuid, 'log']
-      ].each do |attr, label|
-        if cr[attr]
-          gr += describe_node(cr[attr])
-          gr += edge(uuid, cr[attr], {label: label})
+      # Add CR outputs by PDH so they connect with the child CR's inputs.
+      if cr[:output_uuid]
+        output_pdh = Collection.find(cr[:output_uuid])[:portable_data_hash]
+        if output_pdh
+          gr += describe_node(output_pdh)
+          gr += edge(uuid, output_pdh, {label: 'output'})
         end
       end