X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fd1c8009f521564eaec4dbb22cead032e3784023..767e1199d0e1bdf2b564b5c58a91d29141eb67d7:/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 939ddcb43e..8fafbc2022 100644 --- a/apps/workbench/app/helpers/pipeline_instances_helper.rb +++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb @@ -289,7 +289,7 @@ module PipelineInstancesHelper else s = "" if days > 0 - s += "#{days}d " + s += "#{days}d" end if (hours > 0) @@ -298,7 +298,7 @@ module PipelineInstancesHelper s += "#{minutes}m" - if not round_to_min + if not round_to_min or (days == 0 and hours == 0 and minutes == 0) s += "#{seconds}s" end end @@ -306,19 +306,6 @@ module PipelineInstancesHelper raw(s) end - def render_runtime_compact duration - if duration >= DAY - "#{(duration / DAY.to_f).round(2)} days" - elsif duration >= HOUR - "#{(duration / HOUR.to_f).round(2)} hours" - elsif duration >= MINUTE - "#{(duration / MINUTE.to_f).round(2)} minutes" - else - seconds = duration.round(2) - "#{seconds} second#{'s' if seconds != 1}" - end - end - def render_unreadable_inputs_present if current_user and controller.class.name.eql?('PipelineInstancesController') and unreadable_inputs_present? raw('
' +