Files
metacrypt/web/templates/issuer_detail.html

61 lines
1.8 KiB
HTML

{{define "title"}} - Issuer: {{.IssuerName}}{{end}}
{{define "content"}}
<h2>Issuer: {{.IssuerName}}</h2>
<p>
<a href="/pki">&larr; PKI: {{.MountName}}</a>
&nbsp;&mdash;&nbsp;
<a href="/pki/{{.IssuerName}}" download="{{.IssuerName}}.pem">Download Issuer Cert (PEM)</a>
</p>
<h3>Certificates</h3>
<form method="get" action="/pki/issuer/{{.IssuerName}}" style="margin-bottom: 1rem;">
<div class="form-row">
<div class="form-group">
<label for="name_filter">Filter by name</label>
<input type="text" id="name_filter" name="name" value="{{.NameFilter}}" placeholder="common name contains...">
</div>
<div class="form-group">
<label for="sort_by">Sort by</label>
<select id="sort_by" name="sort">
<option value="cn"{{if eq .SortBy "cn"}} selected{{end}}>Common Name</option>
<option value="expiry"{{if eq .SortBy "expiry"}} selected{{end}}>Expiry Date</option>
</select>
</div>
<div class="form-group" style="align-self: flex-end;">
<button type="submit">Apply</button>
</div>
</div>
</form>
{{if .Certs}}
<table>
<thead>
<tr>
<th>Common Name</th>
<th>Profile</th>
<th>Serial</th>
<th>Issued By</th>
<th>Issued At</th>
<th>Expires At</th>
</tr>
</thead>
<tbody>
{{range .Certs}}
<tr>
<td>{{index . "cn"}}</td>
<td>{{index . "profile"}}</td>
<td><code>{{index . "serial"}}</code></td>
<td>{{index . "issued_by"}}</td>
<td>{{index . "issued_at"}}</td>
<td>{{index . "expires_at"}}</td>
</tr>
{{end}}
</tbody>
</table>
{{else}}
<p>No certificates found{{if .NameFilter}} matching &ldquo;{{.NameFilter}}&rdquo;{{end}}.</p>
{{end}}
{{end}}