{# docker/rows.html — HTMX fragment for the Docker main page, grouped by host #} {# ── Summary strip ─────────────────────────────────────────────────────────── #}
Running
{{ running }}
Stopped
{{ stopped }}
Total
{{ total }}
Hosts
{{ host_groups | length }}
{# ── Container tables, one per host ───────────────────────────────────────── #} {% if host_groups %} {% for g in host_groups %}
{% if g.host %} {{ g.host.name }} {% else %} {{ g.host_name }} {% endif %} {{ g.running }} running{% if g.stopped %} · {{ g.stopped }} stopped{% endif %}
{% for item in g.containers %} {% set c = item.container %} {% endfor %}
Container Image Ports CPU % CPU history Mem % Mem history
{{ c.name }} {% if c.health == 'healthy' %} {% elif c.health == 'unhealthy' %} {% elif c.health == 'starting' %}{% endif %}
{{ c.status }}{% if item.uptime %} · up {{ item.uptime }}{% endif %} {% if c.status != 'running' and c.exit_code is not none and c.exit_code != 0 %} · exit {{ c.exit_code }}{% if c.oom_killed %} (OOM){% endif %} {% endif %} {% if c.restart_count %} · ⟳{{ c.restart_count }}{% endif %}
{% if c.service_name or c.compose_project %}
{{ c.service_name or c.compose_project }}
{% endif %}
{{ c.image }} {% for p in item.ports %}
{{ p.host_port }}:{{ p.container_port }}/{{ p.protocol }}
{% endfor %}
{% if c.cpu_pct is not none %} {{ "%.1f" | format(c.cpu_pct) }}% {% else %} {% endif %} {{ item.sparkline_cpu | safe }} {% if c.mem_pct is not none %} {{ "%.1f" | format(c.mem_pct) }}% {% else %} {% endif %} {{ item.sparkline_mem | safe }}
{% endfor %} {% else %}
No containers reported yet. Containers are collected by the Steward host agent — deploy the agent to a host running Docker (Hosts → the host → agent panel) and its containers will appear here under that host.
{% endif %}