feat: F1 — panel admin web (FastAPI, solo 127.0.0.1, X-Admin-Token, SSH tunnel)

This commit is contained in:
markosbenitez
2026-05-30 01:37:14 -03:00
parent 61a15c5c50
commit 8bd1a0dd5b
12 changed files with 552 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
{% extends "base.html" %}
{% block title %} — Tenants{% endblock %}
{% block content %}
<h1>Tenants ({{ tenants|length }})</h1>
<table>
<thead>
<tr>
<th>chat_id</th>
<th>Nombre</th>
<th>Estado</th>
<th>Tono</th>
<th>Timezone</th>
<th>Cédula</th>
<th>Último activo</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
{% for t in tenants %}
<tr>
<td><a href="/tenants/{{ t.chat_id }}">{{ t.chat_id }}</a></td>
<td>{{ t.nombre_preferido or "—" }}</td>
<td><span class="badge badge-{{ t.estado or 'pendiente' }}">{{ t.estado or "pendiente" }}</span></td>
<td>{{ t.tono or "—" }}</td>
<td>{{ t.timezone or "—" }}</td>
<td><code>{{ t.cedula_masked }}</code></td>
<td>{{ (t.last_active or "")[:19] }}</td>
<td>
<a href="/tenants/{{ t.chat_id }}" class="btn btn-primary btn-sm">Ver</a>
<form method="post" action="/tenants/{{ t.chat_id }}/resetear"
onsubmit="return confirm('¿Resetear tenant {{ t.chat_id }}? Esta acción borra el tenant y su snapshot.')">
<button type="submit" class="btn btn-danger btn-sm">Resetear</button>
</form>
</td>
</tr>
{% else %}
<tr><td colspan="8" style="text-align:center;color:#999">Sin tenants registrados</td></tr>
{% endfor %}
</tbody>
</table>
{% endblock %}