2024-03-28 12:57:35 -04:00
|
|
|
{{ define "content" }}
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>Key</th>
|
|
|
|
<th>Created At</th>
|
|
|
|
<th>Revoke</th>
|
|
|
|
</tr>
|
|
|
|
{{ if (eq (len .APIKeys) 0) }}
|
|
|
|
<tr>
|
|
|
|
<td colspan="5"><span class="blinky">No API Keys Found</span></td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
{{ range $key := .APIKeys }}
|
|
|
|
<tr>
|
|
|
|
<td>{{ $key.Key }}</td>
|
|
|
|
<td>{{ $key.CreatedAt }}</td>
|
|
|
|
<td>
|
|
|
|
<form method="POST" action="/keys/delete">
|
|
|
|
<input type="hidden" name="key" value="{{ $key.Key }}" />
|
|
|
|
<input type="submit" value="Revoke" />
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<form method="POST" action="/keys" class="form">
|
|
|
|
<h2>Add An API Key</h2>
|
|
|
|
<hr>
|
|
|
|
<input type="submit" value="Generate" />
|
2024-03-28 16:51:08 -04:00
|
|
|
{{ if .FormError }}
|
2024-03-28 12:57:35 -04:00
|
|
|
{{ if (len .FormError.Errors) }}
|
2024-03-28 16:51:08 -04:00
|
|
|
{{ range $error := .FormError.Errors }}
|
|
|
|
<div class="error">{{ $error }}</div>
|
|
|
|
{{ end }}
|
2024-03-28 12:57:35 -04:00
|
|
|
{{ end }}
|
2024-03-28 16:51:08 -04:00
|
|
|
{{ end }}
|
|
|
|
</form>
|
2024-03-28 12:57:35 -04:00
|
|
|
{{ end }}
|