forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapikeys.html
More file actions
66 lines (66 loc) · 2.24 KB
/
apikeys.html
File metadata and controls
66 lines (66 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{% 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 %}