X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ea17ec3d053bd2f792730c5ea74d03109ef942ce..bf7687829f5222375441cf75c7d82d82a4f508c4:/apps/workbench/app/helpers/pipeline_instances_helper.rb diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb index db2a467b7e..7b6fb72763 100644 --- a/apps/workbench/app/helpers/pipeline_instances_helper.rb +++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb @@ -22,13 +22,22 @@ module PipelineInstancesHelper pj end - def pipieline_log_history(job_uuids) + def pipeline_log_history(job_uuids) results = [] - log_history = Log.where(event_type: 'transient-log-entry', - object_uuid: job_uuids).order('id DESC').limit(5).all + log_history = Log.where(event_type: 'stderr', + object_uuid: job_uuids).order('id DESC') if !log_history.results.empty? - results = log_history.results.reverse + reversed_results = log_history.results.reverse + reversed_results.each do |entry| + if entry.andand.properties + properties = entry.properties + text = properties[:text] + if text + results = results.concat text.split("\n") + end + end + end end return results