{% load custom_tags %}
{% if project_list %}
{% for project in project_list %}
{{ project.project_name|upper }}
{% if project.config %}
{% endif %}
{% for service in project.services %}
{% if perms|get:service.service_name|get:'view' %}
{% if project.config and not service.config %}
(orphan)
{% endif %}
{{ service.service_name }}
{% if service.config_image_display %}
[{{ service.config_image_display }}]
{% endif %}
{% if service.config %}
{% endif %}
{% if service.config %}
{% include 'compose_ui/snippets/containers_table.html' with containers=service.containers disable_container_actions=disable_container_actions service_hash=service.config.hash service_name=service.config.service_name perms=perms only %}
{% else %}
{% include 'compose_ui/snippets/containers_table.html' with containers=service.containers disable_container_actions=disable_container_actions service_name='other_projects' perms=perms only %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% elif container_list %}
{% include 'compose_ui/snippets/containers_table.html' with containers=container_list service_name='other_containers' perms=perms only %}
{% endif %}