aboutsummaryrefslogtreecommitdiff
path: root/server/templates
diff options
context:
space:
mode:
Diffstat (limited to 'server/templates')
-rw-r--r--server/templates/certs.go63
1 files changed, 36 insertions, 27 deletions
diff --git a/server/templates/certs.go b/server/templates/certs.go
index cf4c7d1..89ec5a1 100644
--- a/server/templates/certs.go
+++ b/server/templates/certs.go
@@ -19,36 +19,45 @@ const Certs = `
<h2>Issued SSH Certificates</h2>
</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}}
+ <div id="issued">
+ <input class="u-full-width search" type="text" placeholder="Search" id="q" />
+ <form action="/admin/revoke" method="post" id="form_revoke">
+ {{ .CSRF }}
+ <table id="cert-table">
+ <thead>
<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>
+ <th>ID</th>
+ <th>Created</th>
+ <th>Expires</th>
+ <th>Principals</th>
+ <th>Revoked</th>
+ <th>Revoke</th>
</tr>
- {{ end }}
- </tbody>
- </table>
- </form>
- <button class="button-primary" type="submit" form="form_revoke" value="Submit">Submit</button>
+ </thead>
+ <tbody class="list">
+ {{range .Certs}}
+ <tr>
+ <td class="keyid">{{.KeyID}}</td>
+ <td>{{.CreatedAt}}</td>
+ <td>{{.Expires}}</td>
+ <td class="principals">{{.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>
</div>
</body>
+<script src="/static/js/list.min.js"></script>
+<script>
+var options = {
+ valueNames: [ 'keyid', 'principals' ],
+}
+var issuedList = new List('issued', options);
+</script>
</html>
-
`