40 lines
940 B
HTML
40 lines
940 B
HTML
{{ 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 class="time">{{ $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>generate key.</h2>
|
|
<hr>
|
|
<input type="submit" value="generate." />
|
|
{{ if .FormError }}
|
|
{{ if (len .FormError.Errors) }}
|
|
{{ range $error := .FormError.Errors }}
|
|
<div class="error">{{ $error }}</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</form>
|
|
{{ end }}
|