{% for token in data %}

{{ token.name }}

{% if token.is_active %} Active {% else %} Inactive {% endif %} {% if token.is_revoked %} Revoked {% endif %} {% if token.team_name %} Team: {{ token.team_name }} {% else %} All Teams {% endif %} {% if token.server_id %} Server-scoped {% endif %} {% if token.ip_restrictions and token.ip_restrictions|length > 0 %} {{ token.ip_restrictions|length }} IP{{ 's' if token.ip_restrictions|length > 1 else '' }} {% endif %}
{% if token.description %}

{{ token.description }}

{% endif %}
Created: {{ token.created_at.split('T')[0] if token.created_at else 'Never' }}
Expires: {{ token.expires_at.split('T')[0] if token.expires_at else 'Never' }}
Last Used: {{ token.last_used.split('T')[0] if token.last_used else 'Never' }}
{% if token.server_id %}
Scoped to Server: {{ token.server_id }}
{% endif %} {% if token.resource_scopes and token.resource_scopes|length > 0 %}
Permissions: {{ token.resource_scopes|join(', ') }}
{% endif %}
{% if token.is_active and not token.is_revoked %} {% endif %}
{% endfor %} {% if not data %}

No tokens found. Create your first token above.

{% endif %}
{% set base_url = root_path + '/admin/tokens/partial' %} {% set hx_target = '#tokens-table' %} {% set hx_swap = 'outerHTML' %} {% set hx_indicator = '#tokens-loading' %} {% set table_name = 'tokens' %} {% set query_params = {'include_inactive': include_inactive} %} {% if team_id %}{% set _ = query_params.update({'team_id': team_id}) %}{% endif %} {% include 'pagination_controls.html' %}