{% extends "base.html" %} {% load i18n static %} {% block page_custom_head %} {% if active_tab == 'sessions' and gateway_sessions %} {% endif %} {% endblock %} {% block content %} {% include 'app_gateway/caddy_disabled_alert.html' %} {% include 'app_gateway/pending_export_alert.html' %}
{% if active_tab == 'users' or active_tab == 'groups' %} {% if active_tab == 'users' %} {% if users %}
{% for user in users %} {% endfor %}
{% trans 'Username' %} {% trans 'Email' %} {% trans 'TOTP' %} {% trans 'Groups' %} {% trans 'Actions' %}
{{ user.username }} {{ user.email }} {% if user.totp_secret %} {% trans 'Yes' %} {% else %} {% trans 'No' %} {% endif %} {% for group in user.groups.all %} {{ group }} {% empty %} — {% endfor %}
{% else %}
{% trans 'No Gatekeeper Users found.' %}
{% endif %} {% elif active_tab == 'groups' %} {% if groups %}
{% for group in groups %} {% endfor %}
{% trans 'Group Name' %} {% trans 'Members' %} {% trans 'Actions' %}
{{ group }} {{ group.users.count }}
{% else %}
{% trans 'No Gatekeeper Groups found.' %}
{% endif %} {% endif %} {% elif active_tab == 'auth_methods' %} {% if auth_methods %}
{% for method in auth_methods %} {% endfor %}
{% trans 'Name' %} {% trans 'Type' %} {% trans 'Actions' %}
{{ method }} {{ method.get_auth_type_display }}
{% else %}
{% trans 'No Authentication Methods found.' %}
{% endif %} {% elif active_tab == 'allowed_identities' %} {% if auth_emails or auth_domains %}
{% for email in auth_emails %} {% endfor %} {% for domain in auth_domains %} {% endfor %}
{% trans 'Type' %} {% trans 'Identity' %} {% trans 'Auth Method' %} {% trans 'Actions' %}
{% trans 'Email' %} {{ email.email }} {{ email.auth_method }}
{% trans 'Domain' %} {{ domain.domain }} {{ domain.auth_method }}
{% else %}
{% trans 'No Allowed Emails or Domains found.' %}
{% endif %} {% elif active_tab == 'ip_addresses' %} {% if auth_ips %}
{% for ip in auth_ips %} {% endfor %}
{% trans 'IP Address' %} {% trans 'Prefix Length' %} {% trans 'Action' %} {% trans 'Auth Method' %} {% trans 'Manage' %}
{{ ip.address }} {% if ip.prefix_length %}/{{ ip.prefix_length }}{% endif %} {% if ip.action == 'allow' %} {% trans 'Allow' %} {% else %} {% trans 'Deny' %} {% endif %} {{ ip.auth_method }}
{% else %}
{% trans 'No IP Addresses found.' %}
{% endif %} {% elif active_tab == 'sessions' %}

{% trans 'Sessions opened on the App Gateway login. A session is online when it was used in the last 10 minutes. Sessions of cluster workers are the last ones each worker reported.' %}

{% if gateway_sessions %} {% for session in gateway_sessions %} {% endfor %}
{% trans 'User' %} {% trans 'Server' %} {% trans 'Host' %} {% trans 'Last access' %} {% trans 'IP Address' %} {% trans 'Factors' %} {% trans 'Started' %} {% trans 'Expires' %} {% trans 'Browser' %} {% trans 'Manage' %}
{{ session.username|default:session.email|default:'-' }} {% if session.username and session.email %}
{{ session.email }}{% endif %}
{{ session.server_name|default:_('Primary Server') }} {% if session.stale %}
{% trans 'Worker offline' %}{% endif %}
{{ session.host|default:'-' }} {% if session.online %} {% trans 'Online' %} {% else %} {{ session.last_seen_at|date:'SHORT_DATETIME_FORMAT'|default:'-' }} {% endif %} {{ session.client_ip|default:'-' }} {{ session.factors|join:', '|default:'-' }} {{ session.created|date:'SHORT_DATETIME_FORMAT' }} {{ session.expires|date:'SHORT_DATETIME_FORMAT' }} {{ session.user_agent|truncatechars:60|default:'-' }} {% if session.revoking %} {% trans 'Ending' %} {% else %}
{% csrf_token %}
{% endif %}
{% else %}
{% trans 'No active sessions.' %}
{% endif %} {% endif %}
{% endblock %} {% block custom_page_scripts %} {% if active_tab == 'sessions' and gateway_sessions %} {% endif %} {% endblock %}