{% extends "htmx/form_base.html" %} {% load htmx %} {% block form %} {# hx-target/include/swap are inherited by every hx-post button below #}
{# Card header: counts and refresh #}
Docker Containers
{% if available and not error %} {{ running_count }} running {{ total_count }} total {% endif %}
{# Start / stop / delete results #} {% include "htmx/partials/action_alert.html" %}
{% if not available %}
Docker not installed
{% elif error %}
{{ error }}
{% elif not containers %}
No containers
{% else %}
{% for c in containers %} {% endfor %}
Name Image State Status Ports Actions
{{ c.name }} {{ c.image }} {% if c.state == "running" %} running {% elif c.state == "paused" or c.state == "restarting" %} {{ c.state }} {% elif c.state == "dead" %} {{ c.state }} {% else %} {{ c.state|default:"unknown" }} {% endif %} {{ c.status|default:"-" }} {{ c.ports|default:"-" }}
{% if c.state == "running" %} {% else %} {% endif %}
{% endif %}
{# Log viewer for the selected container #} {% if selected %} {% include "dev_tools/partials/log_viewer.html" with title=selected.name %} {% endif %}
{% endblock %}