diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-09-10 20:16:28 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-09-11 20:41:32 +0100 |
commit | 65151dd29dc01c6d1f6ff79ab6f8e049e925ce25 (patch) | |
tree | 2db5267b573f2a58ffff94de7f9b9af5f9767d82 /server/templates | |
parent | 2e7c8c2f521c9e50bb3aea4df16771c22fe70e58 (diff) |
Add a toggle for unexpired certs
Diffstat (limited to 'server/templates')
-rw-r--r-- | server/templates/certs.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/server/templates/certs.go b/server/templates/certs.go index 89ec5a1..0aa2b7c 100644 --- a/server/templates/certs.go +++ b/server/templates/certs.go @@ -13,7 +13,7 @@ const Certs = ` <link rel="stylesheet" href="/static/css/skeleton.css"> <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet"> </head> -<body> +<body onload="loadCerts()"> <div class="container"> <div class="page-header"> <h2>Issued SSH Certificates</h2> @@ -21,8 +21,9 @@ const Certs = ` <div id="issued"> <input class="u-full-width search" type="text" placeholder="Search" id="q" /> + <button class="button-primary" id="toggle-certs" onclick="toggleExpired()">Show Expired</button> <form action="/admin/revoke" method="post" id="form_revoke"> - {{ .CSRF }} + {{ .csrfField }} <table id="cert-table"> <thead> <tr> @@ -34,17 +35,15 @@ const Certs = ` <th>Revoke</th> </tr> </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> + <tbody id="list" class="list"> + <tr> + <td class="keyid"></td> + <td></td> + <td></td> + <td class="principals"></td> + <td></td> + <td></td> </tr> - {{ end }} </tbody> </table> </form> @@ -59,5 +58,6 @@ var options = { } var issuedList = new List('issued', options); </script> +<script src="/static/js/table.js"></script> </html> ` |