X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/43a2aef67a96033f54e9f19cd9788e059e72115a..c005c5ab76492b844e84d1c66f75797bd98d0996:/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 56e85dbd79..b282723c88 100644 --- a/apps/workbench/app/helpers/pipeline_instances_helper.rb +++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb @@ -22,27 +22,6 @@ module PipelineInstancesHelper pj end - def pipieline_log_history(job_uuids) - results = [] - - log_history = Log.where(event_type: 'stderr', - object_uuid: job_uuids).order('id DESC') - if !log_history.results.empty? - 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 - end - protected def pipeline_jobs_newschool object @@ -52,6 +31,10 @@ module PipelineInstancesHelper object.components.each do |cname, c| i += 1 pj = {index: i, name: cname} + if not c.is_a?(Hash) + ret << pj + next + end pj[:job] = c[:job].is_a?(Hash) ? c[:job] : {} pj[:percent_done] = 0 pj[:percent_running] = 0 @@ -82,17 +65,22 @@ module PipelineInstancesHelper end if pj[:job][:success] pj[:result] = 'complete' + pj[:labeltype] = 'success' pj[:complete] = true pj[:progress] = 1.0 elsif pj[:job][:finished_at] pj[:result] = 'failed' + pj[:labeltype] = 'danger' pj[:failed] = true elsif pj[:job][:started_at] pj[:result] = 'running' + pj[:labeltype] = 'primary' elsif pj[:job][:uuid] pj[:result] = 'queued' + pj[:labeltype] = 'default' else pj[:result] = 'none' + pj[:labeltype] = 'default' end pj[:job_id] = pj[:job][:uuid] pj[:script] = pj[:job][:script] || c[:script]