mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-03 11:22:45 +02:00
dashboard: improve display of device credentials, allow deletion (#2829)
* dashboard: improve display of device credentials, allow deletion * fix test
This commit is contained in:
parent
c064bc8e0e
commit
838c9e3a3d
8 changed files with 225 additions and 36 deletions
|
@ -182,10 +182,10 @@
|
|||
<div class="messages">
|
||||
<div class="box-inner">
|
||||
<div class="category-header clearfix">
|
||||
<span class="category-title">Device Credentials</span>
|
||||
<span class="category-title">Current Session Device Credentials</span>
|
||||
</div>
|
||||
</ul>
|
||||
{{if .DeviceCredentials}}
|
||||
{{if .CurrentDeviceCredentials}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -193,9 +193,17 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .DeviceCredentials}}
|
||||
{{range .CurrentDeviceCredentials}}
|
||||
<tr>
|
||||
<td>{{.Id}}</td>
|
||||
<td>{{.ID}}</td>
|
||||
<td>
|
||||
<form action="{{$.WebAuthnURL}}" method="POST">
|
||||
{{$.csrfField}}
|
||||
<input type="hidden" name="action" value="unregister">
|
||||
<input type="hidden" name="pomerium_device_credential_id" value="{{.ID}}">
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
|
@ -204,6 +212,35 @@
|
|||
No device credentials found!
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .OtherDeviceCredentials}}
|
||||
<div class="box-inner">
|
||||
<div class="category-header clearfix">
|
||||
<span class="category-title">Other Device Credentials</span>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .OtherDeviceCredentials}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td>
|
||||
<form action="{{$.WebAuthnURL}}" method="POST">
|
||||
{{$.csrfField}}
|
||||
<input type="hidden" name="action" value="unregister">
|
||||
<input type="hidden" name="pomerium_device_credential_id" value="{{.ID}}">
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="category-link">
|
||||
Register device with <a href="{{.WebAuthnURL}}">WebAuthn</a>.
|
||||
</div>
|
||||
|
|
|
@ -147,6 +147,9 @@ body {
|
|||
.box-inner {
|
||||
padding: 35px;
|
||||
}
|
||||
.box-inner ~ .box-inner {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.white {
|
||||
background: white;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue