{% extends "base_template.html" %} {% block title %}{{ _('API tokens') }}{% endblock %} {% block content %}

{{ _('API') }} {{ _('tokens') }}

{{ _('Tokens let the splent command line act on your behalf. The token itself is shown once, when you create it, and is never stored here.') }}

{{ _('New token') }}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for category, message in messages %}
{{ message }}
{% endfor %}
{% endif %} {% endwith %} {% if tokens %}
{% for token in tokens %} {% endfor %}
{{ _('Name') }} {{ _('Token') }} {{ _('Scopes') }} {{ _('Created') }} {{ _('Expires') }} {{ _('Last used') }} {{ _('State') }}
{{ token.name }} {{ token.prefix }}... {% for scope in token.scope_list %} {{ scope }} {% endfor %} {{ token.created_at.strftime('%Y-%m-%d %H:%M') if token.created_at else '' }} {% if token.expires_at %} {{ token.expires_at.strftime('%Y-%m-%d %H:%M') }} {% else %} {{ _('Never') }} {% endif %} {% if token.last_used_at %} {{ token.last_used_at.strftime('%Y-%m-%d %H:%M') }} {% else %} {{ _('Never') }} {% endif %} {% if token.is_revoked %} {{ _('Revoked') }} {% elif token.is_expired %} {{ _('Expired') }} {% else %} {{ _('Active') }} {% endif %} {% if not token.is_revoked %}
{{ revoke_form.hidden_tag() }}
{% endif %}
{% else %}
{{ _('You have no tokens yet. Create one to use the splent command line.') }}
{% endif %} {% endblock %}