X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6b9eafb0de63da57e7b1a3945e7d16823e1c25df..2f83fcd45b4b23db2bb5bb4afbe1e863ebd77ec6:/apps/workbench/app/views/projects/_container_summary.html.erb diff --git a/apps/workbench/app/views/projects/_container_summary.html.erb b/apps/workbench/app/views/projects/_container_summary.html.erb index 1a411afc9f..c40ee370bd 100644 --- a/apps/workbench/app/views/projects/_container_summary.html.erb +++ b/apps/workbench/app/views/projects/_container_summary.html.erb @@ -3,28 +3,39 @@ SPDX-License-Identifier: AGPL-3.0 %>
- +
- <% pending_containers = Container.order("modified_at asc").filter([["state", "in", ["Queued", "Locked"]], ["priority", ">", 0]]).limit(1) %> + + + + + <% pending_containers = Container.order("created_at asc").filter([["state", "in", ["Queued", "Locked"]], ["priority", ">", 0]]).limit(1) %> <% running_containers = Container.order("started_at asc").where(state: "Running").limit(1) %> - - + + - - - - - - + + +
Pending containersRunning containers
<%= pending_containers.items_available %> <%= running_containers.items_available %>
Pending containersRunning containersOldest pendingLongest running
<%= if pending_containers.first then render_runtime(Time.now - pending_containers.first.modified_at, false, false) else "-" end %><%= if running_containers.first then render_runtime(Time.now - running_containers.first.started_at, false, false) else "-" end %>
Oldest pendingLongest running<% if pending_containers.first then %> + <%= link_to_if_arvados_object pending_containers.first, link_text: render_runtime(Time.now - pending_containers.first.created_at, false, false) %> + <% else %> + - + <% end %> + <% if running_containers.first then %> + <%= link_to_if_arvados_object running_containers.first, link_text: render_runtime(Time.now - running_containers.first.created_at, false, false) %> + <% else %> + - + <% end %> +