projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18995: Merge branch 'main' into 18995-code-cleanup-5
[arvados.git]
/
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 de706896562c6f6f27c30eedd8432a32537c2f8b..1d75f584334ee944837183f27f6efc9f9d66c68d 100644
(file)
--- a/
apps/workbench/app/models/pipeline_instance_work_unit.rb
+++ b/
apps/workbench/app/models/pipeline_instance_work_unit.rb
@@
-9,7
+9,7
@@
class PipelineInstanceWorkUnit < ProxyWorkUnit
items = []
jobs = {}
items = []
jobs = {}
- results = Job.where(uuid: @proxied.job_ids.values).results
+ results = Job.where(uuid: @proxied.job_ids.values).
with_count("none").
results
results.each do |j|
jobs[j.uuid] = j
end
results.each do |j|
jobs[j.uuid] = j
end
@@
-61,11
+61,14
@@
class PipelineInstanceWorkUnit < ProxyWorkUnit
end
def state_label
end
def state_label
- # Show "Cancelled" instead of "Failed" if there are no failed
- # components. #12840
if get(:state) != "Failed"
return super
end
if get(:state) != "Failed"
return super
end
+ if get(:components_summary).andand[:failed].andand > 0
+ return super
+ end
+ # Show "Cancelled" instead of "Failed" if there are no failed
+ # components. #12840
get(:components).each do |_, c|
jstate = c[:job][:state] rescue nil
if jstate == "Failed"
get(:components).each do |_, c|
jstate = c[:job][:state] rescue nil
if jstate == "Failed"