aboutsummaryrefslogtreecommitdiff
path: root/templates/certs.go
blob: 877a0b3c657229d914e8a85d356f3cf3f318a020 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package templates

// Certs lists all unexpired issued certificates.
const Certs = `<html>
  <head>
    <title>Certs</title>
    <style>
      <!--
      body {
        font-family: sans-serif;
        background-color: #edece4;
        margin-top: 120px;
      }
      .code {
        background-color: #26292B;
        border: none;
        color: #fff;
        font-family: monospace;
        font-size: 13;
        font-weight: bold;
        height: auto;
        margin: 12px 12px 12px 12px;
        padding: 24px 12px 12px 12px;
        resize: none;
        text-align: center;
        width: 960px;
      }
      ::selection {
        background: #32d0ff;
        color: #000;
      }
      ::-moz-selection {
        background: #32d0ff;
        color: #000;
      }
      -->
    </style>
  </head>
  <body>

  <form action="/admin/revoke" method="post" id="form_revoke">
  {{ .CSRF }}
  <table>
	<tr>
		<th>ID</th>
		<th>Created</th>
		<th>Expires</th>
		<th>Principals</th>
		<th>Revoked</th>
		<th>Revoke</th>
	</tr>

  {{range .Certs}}
	<tr>
	<td>{{.KeyID}}</td>
	<td>{{.CreatedAt}}</td>
	<td>{{.Expires}}</td>
	<td>{{.Principals}}</td>
	<td>{{.Revoked}}</td>
	<td>
		{{if not .Revoked}}
		<input type="checkbox" value="{{.KeyID}}" name="cert_id" id="cert_id" />
		{{end}}
	</td>
	</tr>
  {{ end }}
  </table>
  </form>
  <button type="submit" form="form_revoke" value="Submit">Submit</button>
  </body>
</html>`