X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/15409c5e2b7946ff7f5fd104a6757a4d874448d4..ec75fda0fc2c86a77d831dcd7962ece7a2d6ae6d:/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb 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 2c95c921fb..d99ac23ab8 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 @@ -1,5 +1,18 @@ <%# Summary %> +
This pipeline is paused. Jobs that are @@ -7,18 +20,19 @@
<% end %> -- <% if @object.started_at %> - Started at <%= @object.started_at %>. - <% end %> +<% tasks = JobTask.filter([['job_uuid', 'in', job_uuids]]).results %> +<% runningtime = determine_wallclock_runtime(pipeline_jobs.map {|j| j[:job]}.compact) %> +
<% if @object.started_at %> + This pipeline started at <%= render_localized_date(@object.started_at) %>. + It <% if @object.state == 'Complete' %> - Completed in + completed in <% elsif @object.state == 'Failed' %> - Failed after + failed after <% else %> - Has been active for + has been active for <% end %> <% walltime = if @object.finished_at then @@ -26,12 +40,16 @@ else Time.now - @object.started_at end %> - - <%= runtime(walltime, true) %><% if @object.finished_at %> at <%= @object.finished_at %><% end %>. - <% else %> - Pipeline is <%= @object.state.downcase %>. - <% walltime = 0%> - <% end %> + + <%= if walltime > runningtime + render_runtime(walltime, true, false) + else + 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 %>. + <% walltime = 0%> + <% end %> <% if @object.state == 'Failed' %> Check the Log tab for more detail about why this pipeline failed. @@ -39,203 +57,30 @@
- <% tasks = JobTask.filter([['job_uuid', 'in', render_pipeline_jobs.map { |j| j[:job].andand[:uuid] }]]).results %> - <% runningtime = determine_wallclock_runtime(render_pipeline_jobs.map {|j| j[:job]}) %> - + This pipeline <% if @object.state.start_with? 'Running' %> - Has run - <% else %> - Ran + has run + <% else %> + ran <% end %> for - <%= runtime(runningtime, true) %> - <% if walltime - runningtime > 0 %> - (<%= runtime(walltime - runningtime, true) %> queued)<% end %><% if tasks.size == 0 %>.<% else %> + <% cputime = tasks.map { |task| + if task.started_at + (if task.finished_at then task.finished_at else Time.now() end) - task.started_at + else + 0 + end + }.reduce(:+) || 0 %> + <%= render_runtime(runningtime, true, false) %><% if (walltime - runningtime) > 0 %> + (<%= render_runtime(walltime - runningtime, true, false) %> queued)<% end %><% if cputime == 0 %>.<% else %> and used - <% cputime = tasks.map { |task| - puts "started at #{task.started_at}" - if task.started_at - (if task.finished_at then task.finished_at else Time.now() end) - task.started_at - else - 0 - end - }.reduce(:+) %> - <%= runtime(cputime, true) %> + <%= render_runtime(cputime, true, false) %> of CPU time (<%= (cputime/runningtime).round(1) %>⨯ scaling). <% end %>
<%# Components %> -<% render_pipeline_jobs.each_index do |i| %> - <% pj = render_pipeline_jobs[i] %> - <% current_job = pj[:job] if pj[:job] != {} %> -- <%= k.to_s %>: - | -- <%= current_component[k] %> - | -
- docker_image: - | -- <%= current_component[:runtime_constraints][:docker_image] %> - | -
- docker_image_locator: - | -- <%= link_to_if_arvados_object current_component[:docker_image_locator] %> - | -
- docker_image: - | -- Not run in Docker - | -
- <%= k.to_s %>: - | -- <% if k.to_s.end_with? 'uuid' %> - <%= link_to_if_arvados_object current_component[k], friendly_name: true %> - <% elsif k.to_s.end_with? '_at' %> - <%= current_component[k] %> - <% else %> - <%= current_component[k] %> - <% end %> - | -
script_parameters:
-<%= JSON.pretty_generate(current_component[:script_parameters]) rescue nil %>-
<%= 'tasks:' if d == :done %> | -<%= d.to_s %> | -<%= current_component[:tasks_summary][d] %> | -