1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class PipelineInstanceWorkUnit < ProxyWorkUnit
7 return @my_children if @my_children
12 results = Job.where(uuid: @proxied.job_ids.values).with_count("none").results
17 components = get(:components)
18 components.each do |name, c|
22 if job[:uuid] and jobs[job[:uuid]]
23 items << jobs[job[:uuid]].work_unit(name)
25 items << JobWorkUnit.new(job, name, uuid)
28 items << JobWorkUnit.new(c, name, uuid)
31 @unreadable_children = true
41 components = get(:components)
42 components.each do |name, c|
44 items << c[:output_uuid] if c[:output_uuid]
52 "/pipeline_instances/#{uuid}"
60 get(:pipeline_template_uuid)
64 if get(:state) != "Failed"
67 if get(:components_summary).andand[:failed].andand > 0
70 # Show "Cancelled" instead of "Failed" if there are no failed
72 get(:components).each do |_, c|
73 jstate = c[:job][:state] rescue nil