From: Peter Amstutz Date: Tue, 23 Sep 2014 18:48:17 +0000 (-0400) Subject: Bugfix time display, also bugfix for job state "Completed" -> "Complete". refs ... X-Git-Tag: 1.1.0~2173 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/92211c8bed5aaf3abd83d02c4adbaf2329123bac Bugfix time display, also bugfix for job state "Completed" -> "Complete". refs #3187 --- diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb index 599da421cf..7e5324be7a 100644 --- a/apps/workbench/app/helpers/pipeline_instances_helper.rb +++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb @@ -256,7 +256,7 @@ module PipelineInstancesHelper if minutes > 0 then s << "#{minutes} minute#{'s' if minutes != 1}" end - if seconds > 0 and not round_to_min + if not round_to_min or s.size == 0 s << "#{seconds} second#{'s' if seconds != 1}" end s = s * " " diff --git a/apps/workbench/app/views/application/_job_status_label.html.erb b/apps/workbench/app/views/application/_job_status_label.html.erb index 86c3415453..ece81676d8 100644 --- a/apps/workbench/app/views/application/_job_status_label.html.erb +++ b/apps/workbench/app/views/application/_job_status_label.html.erb @@ -1,7 +1,7 @@ <% status = Job.state j %> <% to_label = { "Cancelled" => "danger", - "Completed" => "success", + "Complete" => "success", "Running" => "info", "Failed" => "danger", "Queued" => "default", diff --git a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb index 8f89916fba..1d52e281f6 100644 --- a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb +++ b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb @@ -31,7 +31,7 @@ <% end %> - <% if Job::state(current_job).in? ["Completed", "Failed", "Canceled"] %> + <% if Job::state(current_job).in? ["Complete", "Failed", "Canceled"] %>
<% if pj[:output_uuid] %> <%= link_to_if_arvados_object pj[:output_uuid], friendly_name: true %> diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb index 8af8c881d8..acaf9d34f4 100644 --- a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb +++ b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb @@ -29,9 +29,9 @@ end %> <%= if walltime > runningtime - render_runtime(walltime, true) + render_runtime(walltime, true, false) else - render_runtime(runningtime, true) + render_runtime(runningtime, true, false) end %><% if @object.finished_at %> at <%= render_localized_date(@object.finished_at) %><% end %>. <% else %> This pipeline is <%= if @object.state.start_with? 'Running' then 'active' else @object.state.downcase end %>. @@ -61,7 +61,7 @@ <%= render_runtime(runningtime, true, false) %><% if (walltime - runningtime) > 0 %> (<%= render_runtime(walltime - runningtime, true, false) %> queued)<% end %><% if cputime == 0 %>.<% else %> and used - <%= render_runtime(cputime, true) %> + <%= render_runtime(cputime, true, false) %> of CPU time (<%= (cputime/runningtime).round(1) %>⨯ scaling). <% end %>

diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb index 47315941a0..2841637ded 100644 --- a/apps/workbench/app/views/projects/_show_dashboard.html.erb +++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb @@ -38,7 +38,7 @@ <% running << k %> <% elsif Job::state(v[:job]) == "Failed" or Job::state(v[:job]) == "Cancelled" %> <% failed << k %> - <% elsif Job::state(v[:job]) == "Completed" %> + <% elsif Job::state(v[:job]) == "Complete" %> <% completed << k %> <% elsif Job::state(v[:job]) == "Queued" %> <% queued << k %>