aboutsummaryrefslogtreecommitdiff
path: root/server/templates/certs.go
blob: 8c7f7ef31a3f335d9903cef3011cc7aae60f59ef (plain)
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
package templates

// Certs lists all unexpired issued certificates.
const Certs = `
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Issued Certificates</title>

	<link rel="stylesheet" href="/static/css/normalize.css">
	<link rel="stylesheet" href="/static/css/skeleton.css">
	<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
</head>
<body>
	<div class="container">
		<div class="page-header">
			<h1>Issued SSH Certificates</h1>
		</div>

		<form action="/admin/revoke" method="post" id="form_revoke">
		{{ .CSRF }}
		<table>
			<thead>
			<tr>
				<th>ID</th>
				<th>Created</th>
				<th>Expires</th>
				<th>Principals</th>
				<th>Revoked</th>
				<th>Revoke</th>
			</tr>
			</thead>
			<tbody>
			{{range .Certs}}
				<tr>
				<td>{{.KeyID}}</td>
				<td>{{.CreatedAt}}</td>
				<td>{{.Expires}}</td>
				<td>{{.Principals}}</td>
				<td>{{.Revoked}}</td>
				<td>{{if not .Revoked}}<input style="margin:0;" type="checkbox" value="{{.KeyID}}" name="cert_id" id="cert_id" />{{end}}</td>
				</tr>
			{{ end }}
			</tbody>
		</table>
		</form>
		<button class="button-primary" type="submit" form="form_revoke" value="Submit">Submit</button>
	</div>
</body>
</html>

`