{# Container list for a stack on a single host #} {% from "partials/icons.html" import terminal, rotate_ccw, scroll_text, square, play, cloud_download %} {% macro container_row(stack, container, host) %}
{% if container.State == "running" %} running {% elif container.State == "unknown" %} {% elif container.State == "exited" %} {% if container.ExitCode == 0 %} exited (0) {% else %} exited ({{ container.ExitCode }}) {% endif %} {% elif container.State == "created" %} created {% else %} {{ container.State }} {% endif %} {{ container.Name }}
{% endmacro %} {% macro host_containers(stack, host, containers, show_header=False) %} {% if show_header %}
{{ host }}
{% endif %} {% for container in containers %} {{ container_row(stack, container, host) }} {% endfor %} {% endmacro %}