{% extends "base.html" %} {% load i18n %} {% block content %} {% include 'app_gateway/caddy_disabled_alert.html' %}
{% if active_tab == 'applications' or active_tab == 'hosts' %}
{% if active_tab == 'applications' %}
{% if caddy_enabled %}
{% csrf_token %}
{% else %} {% endif %} {% trans 'Add Application' %}
{% endif %}
{% if active_tab == 'applications' %} {% if applications %}
{% for app in applications %} {% endfor %}
{% trans 'Name' %} {% trans 'Upstream' %} {% trans 'Hosts' %} {% trans 'Routes' %} {% trans 'Default Policy' %}
{{ app }} {{ app.upstream }} {{ app.hosts.count }} {{ app.routes.count }} {% if app.default_policy_config %} {{ app.default_policy_config.default_policy }} {% else %} {% trans 'Default (Deny)' %} {% endif %}
{% else %}
{% trans 'No Applications found.' %}
{% endif %} {% elif active_tab == 'hosts' %} {% if hosts %}
{% for host in hosts %} {% endfor %}
{% trans 'Hostname' %} {% trans 'Application' %}
{{ host.hostname }} {{ host.application }}
{% else %}
{% trans 'No Hosts found.' %}
{% endif %} {% endif %} {% elif active_tab == 'policies' %} {% if access_policies %}
{% for policy in access_policies %} {% endfor %}
{% trans 'Name' %} {% trans 'Policy Type' %} {% trans 'Groups' %} {% trans 'Auth Methods' %} {% trans 'Actions' %}
{{ policy.display_name|default:policy.name }} {{ policy.get_policy_type_display }} {{ policy.groups.count }} {{ policy.methods.count }}
{% else %}
{% trans 'No Access Policies found.' %}
{% endif %} {% endif %}
{% endblock %}