{# docker/widget_resources.html — the dashboard Busiest Containers widget (#5253): a verdict naming the busiest, then a table of the top containers by CPU (averaged over the last few minutes, so the order holds still). Each figure carries its unit; the shaded bar behind it is its share of the host's cores, or of the memory limit (the host's memory when none is set). #} {% if not rows %}
No running containers.
{% else %} {% set top = rows[0] %}
Busiest: {{ top.label }} on {{ top.host_name }}, {% if top.usage.cores is not none %}{{ "%.2f"|format(top.usage.cores) if top.usage.cores < 1 else "%.1f"|format(top.usage.cores) }} {%- if top.usage.cpus %} of {{ top.usage.cpus }} cores{% else %} cores{% endif %}{% else %}no CPU reading yet{% endif %}.
{% for r in rows %} {% set u = r.usage %} {% if u.cores is none %}{% else %} {% endif %} {% if u.mem_bytes is none %}{% else %} {% endif %} {% endfor %}
ContainerHostCPUMemory
{%- if session.user_id %}{{ r.label }}{% else %}{{ r.label }}{% endif -%} {{ r.host_name }}— {{- "%.2f"|format(u.cores) if u.cores < 1 else "%.1f"|format(u.cores) }} cores— {{- u.mem_bytes|bytes }}
CPU over the last {{ minutes }} minutes. Shading: share of the host's cores, and of the memory limit (or the host's memory when no limit is set).
{% endif %}