datatracker/ietf/templates/ietfauth/apikeys.html
Lars Eggert bbf088e18b Hopefully the final check-ins.
- Legacy-Id: 19909
2022-02-08 17:29:15 +00:00

66 lines
2.2 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load widget_tweaks django_bootstrap5 %}
{% load person_filters static %}
{% block pagehead %}
<link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}
{% block title %}API keys for {{ user }}{% endblock %}
{% block content %}
{% origin %}
<h1>
API keys
<br>
<small class="text-muted">{{ user.username }}</small>
</h1>
{% csrf_token %}
<table class="table table-sm tablesorter">
{% for key in person.apikeys.all %}
{% if forloop.first %}
<thead>
<tr >
<th data-sort="endpoint">Endpoint</th>
<th data-sort="created">Created</th>
<th data-sort="date">Last use</th>
<th data-sort="count">Count</th>
<th data-sort="valid">Valid</th>
<th data-sort="key">Key hash</th>
<th></th>
</tr>
</thead>
{% endif %}
<tr>
<td>
<code>{{ key.endpoint }}</code>
</td>
<td>{{ key.created }}</td>
<td>{{ key.latest }}</td>
<td>{{ key.count }}</td>
<td>{{ key.valid }}</td>
<td>
<code>{{ key.hash }}</code>
</td>
<td >
{% if key.valid %}
<a href="{% url 'ietf.ietfauth.views.apikey_disable' %}?hash={{ key.hash }}"
class="btn btn-danger btn-sm del-apikey float-end">
Disable
</a>
{% endif %}
</td>
</tr>
{% empty %}
<tr>
<td>You have no personal API keys.</td>
</tr>
{% endfor %}
</table>
<a href="{% url 'ietf.ietfauth.views.apikey_create' %}"
class="btn btn-primary add-apikey my-3">
Get a new personal API key
</a>
{% endblock %}
{% block js %}
<script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}