X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a31816b03c8249178d51621524f05437f5f9478a..695702b379a7be5abd96742ffee7f4f4bfcef2a8:/apps/workbench/app/models/pipeline_instance_work_unit.rb diff --git a/apps/workbench/app/models/pipeline_instance_work_unit.rb b/apps/workbench/app/models/pipeline_instance_work_unit.rb index 8285424a29..dd5685ac3d 100644 --- a/apps/workbench/app/models/pipeline_instance_work_unit.rb +++ b/apps/workbench/app/models/pipeline_instance_work_unit.rb @@ -1,11 +1,11 @@ class PipelineInstanceWorkUnit < ProxyWorkUnit def children - return self.my_children if self.my_children + return @my_children if @my_children items = [] jobs = {} - results = Job.where(uuid: self.proxied.job_ids.values).results + results = Job.where(uuid: @proxied.job_ids.values).results results.each do |j| jobs[j.uuid] = j end @@ -21,15 +21,26 @@ class PipelineInstanceWorkUnit < ProxyWorkUnit items << JobWorkUnit.new(job, name) end else - items << ProxyWorkUnit.new(c, name) + items << JobWorkUnit.new(c, name) end else - self.unreadable_children = true + @unreadable_children = true break end end - self.my_children = items + @my_children = items + end + + def outputs + items = [] + components = get(:components) + components.each do |name, c| + if c.is_a?(Hash) + items << c[:output_uuid] if c[:output_uuid] + end + end + items end def uri @@ -40,4 +51,8 @@ class PipelineInstanceWorkUnit < ProxyWorkUnit def title "pipeline" end + + def template_uuid + get(:pipeline_template_uuid) + end end