1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <div class="compute-summary-numbers">
12 <% queued_containers = Container.order("modified_at asc").filter([["state", "in", ["Queued", "Locked"]], ["priority", ">", 0]]).limit(1) %>
13 <% running_containers = Container.order("started_at desc").where(state: "Running").limit(1) %>
14 <td><%= queued_containers.items_available %></td>
15 <td><%= running_containers.items_available %></td>
18 <th>Pending containers</th>
19 <th>Running containers</th>
22 <th><%= if queued_containers.first then render_runtime(Time.now - queued_containers.first.modified_at, false, false) else "-" end %></th>
23 <th><%= if running_containers.first then render_runtime(Time.now - running_containers.first.started_at, false, false) else "-" end %></th>