mirror of
https://github.com/laurivosandi/certidude
synced 2024-11-16 18:06:44 +00:00
67 lines
3.6 KiB
HTML
67 lines
3.6 KiB
HTML
<p>
|
|
<div id="request-{{ request.common_name | replace('@', '--') | replace('.', '-') }}" class="card">
|
|
<div class="card-header">
|
|
{% if certificate.server %}
|
|
<i class="fa fa-server"></i>
|
|
{% else %}
|
|
<i class="fa fa-laptop"></i>
|
|
{% endif %}
|
|
{{ request.common_name }}
|
|
</div>
|
|
<div class="card-block">
|
|
<p class="mb-1">
|
|
Submitted
|
|
<time class="timeago" datetime="{{ request.submitted }}">Request was submitted {{ request.submitted }}</time>
|
|
from
|
|
{% if request.hostname %}{{request.hostname}} ({{request.address}}){% else %}{{request.address}}{% endif %}
|
|
</p>
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-secondary" data-toggle="collapse" data-target="#details-{{ request.sha256sum }}"><i class="fa fa-list"></i> Details</button>
|
|
<button type="button" class="btn btn-danger"
|
|
data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Rejecting..."
|
|
onclick="javascript:$(this).button('loading');$.ajax({url:'/api/request/{{request.common_name}}/?sha256sum={{ request.sha256sum }}',type:'delete'});">
|
|
<i class="fa fa-trash"></i> Reject</button>
|
|
<button type="button" class="btn btn-success"
|
|
data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Processing Order"
|
|
onclick="javascript:$(this).button('loading');$.ajax({url:'/api/request/{{request.common_name}}/?sha256sum={{ request.sha256sum }}',type:'post'});">
|
|
<i class="fa fa-thumbs-up"></i> Sign</button>
|
|
<button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<span class="sr-only">Toggle Dropdown</span>
|
|
</button>
|
|
<div class="dropdown-menu">
|
|
{% for p in session.authority.signature.profiles %}
|
|
<a class="dropdown-item{% if p.server and not request.server %} disabled{% endif %}"
|
|
{% if p.server and not request.server %}title="Resubmit with FQDN as common name"{% endif %}
|
|
href="#" onclick="javascript:$.ajax({url:'/api/request/{{request.common_name}}/?sha256sum={{ request.sha256sum }}&profile={{ p.name }}',type:'post'});">
|
|
{% if p.title %}{{ p.title }} ({% if p.server %}server{% else %}client{% endif %}){% else %}
|
|
{% if p.server %}Server{% else %}Client{% endif %}{% endif %}, expires in {{ p.lifetime }} days</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="collapse" id="details-{{ request.sha256sum }}">
|
|
<p>Use following to fetch the signing request:</p>
|
|
<div class="bd-example">
|
|
<pre><code class="language-sh" data-lang="sh">wget <a href="/api/request/{{ request.common_name }}/">http://{{ window.location.hostname }}/api/request/{{ request.common_name }}/</a>
|
|
curl http://{{ window.location.hostname }}/api/request/{{ request.common_name }}/ \
|
|
| openssl req -text -noout</code></pre>
|
|
</div>
|
|
|
|
<div style="overflow: auto; max-width: 100%;">
|
|
<table class="table" id="signed_certificates">
|
|
<tbody>
|
|
<tr><th>Common name</th><td>{{ request.common_name }}</td></tr>
|
|
<tr><th>Submitted</th><td>{{ request.submitted | datetime }}
|
|
{% if request.address %}from {{ request.address }}
|
|
{% if request.hostname %} ({{ request.hostname }}){% endif %}{% endif %}</td></tr>
|
|
<tr><th>MD5</th><td>{{ request.md5sum }}</td></tr>
|
|
<tr><th>SHA1</th><td>{{ request.sha1sum }}</td></tr>
|
|
<tr><th>SHA256</th><td>{{ request.sha256sum }}</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</p>
|