<%# Copyright (C) The Arvados Authors. All rights reserved. SPDX-License-Identifier: AGPL-3.0 %>
<% pending_containers = Container.order("modified_at asc").filter([["state", "in", ["Queued", "Locked"]], ["priority", ">", 0]]).limit(1) %> <% running_containers = Container.order("started_at asc").where(state: "Running").limit(1) %>
<%= pending_containers.items_available %> <%= running_containers.items_available %>
Pending containers Running containers
<%= 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 pending Longest running