63 lines
3.0 KiB
HTML
63 lines
3.0 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %} - Dashboard{% endblock %}
|
|
{% block content %}
|
|
<h1 class="text-2xl font-bold mb-6">Dashboard</h1>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8">
|
|
<div class="bg-gray-800 rounded-lg p-6 border border-gray-700">
|
|
<div class="text-sm text-gray-400">Issued Certificates</div>
|
|
<div class="text-3xl font-bold text-green-400">{{ issued }}</div>
|
|
</div>
|
|
<div class="bg-gray-800 rounded-lg p-6 border border-gray-700">
|
|
<div class="text-sm text-gray-400">Pending Issue</div>
|
|
<div class="text-3xl font-bold text-yellow-400">{{ pending }}</div>
|
|
</div>
|
|
<div class="bg-gray-800 rounded-lg p-6 border border-gray-700">
|
|
<div class="text-sm text-gray-400">Registered Domains</div>
|
|
<div class="text-3xl font-bold text-blue-400">{{ domains|length }}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="text-xl font-bold mb-4">Recent Certificates</h2>
|
|
<div class="bg-gray-800 rounded-lg border border-gray-700 overflow-hidden">
|
|
<table class="w-full text-sm">
|
|
<thead class="bg-gray-750 border-b border-gray-700">
|
|
<tr>
|
|
<th class="text-left p-3 text-gray-400">Subject</th>
|
|
<th class="text-left p-3 text-gray-400">Domain</th>
|
|
<th class="text-left p-3 text-gray-400">Status</th>
|
|
<th class="text-left p-3 text-gray-400">Expires</th>
|
|
<th class="text-left p-3 text-gray-400">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for c in certs %}
|
|
<tr class="border-b border-gray-700/50">
|
|
<td class="p-3 font-mono">{{ c.subject }}</td>
|
|
<td class="p-3">{{ c.domain_name or '-' }}</td>
|
|
<td class="p-3">
|
|
<span class="px-2 py-1 rounded text-xs {% if c.status == 'issued' %}bg-green-900 text-green-300{% elif c.status == 'pending' %}bg-yellow-900 text-yellow-300{% else %}bg-gray-700{% endif %}">
|
|
{{ c.status }}
|
|
</span>
|
|
</td>
|
|
<td class="p-3 text-gray-400">{{ c.expires_at[:10] if c.expires_at else '-' }}</td>
|
|
<td class="p-3">
|
|
{% if c.status == 'issued' %}
|
|
<a href="/api/certs/{{ c.id }}/pem" class="text-blue-400 hover:text-blue-300 mr-2">PEM</a>
|
|
<a href="/api/certs/{{ c.id }}/pfx" class="text-blue-400 hover:text-blue-300">PFX</a>
|
|
{% elif c.status == 'pending' %}
|
|
<button hx-post="/api/certs/{{ c.id }}/sign/web" hx-target="#sign-msg-{{ c.id }}"
|
|
class="text-yellow-400 hover:text-yellow-300">Issue</button>
|
|
<span id="sign-msg-{{ c.id }}" class="ml-2"></span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% if not certs %}
|
|
<tr><td colspan="5" class="p-6 text-center text-gray-500">No certificates yet</td></tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|