Add Web UI

This commit is contained in:
Francesco Picone
2025-12-29 11:58:31 +01:00
parent b2fc73e829
commit e93b25ee20
5 changed files with 122 additions and 1 deletions

42
ui/templates/index.html Normal file
View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cloudflare DDNS Status</title>
<meta http-equiv="refresh" content="{{ 60 }}">
<style>
body { background:#0f1115; color:#eee; font-family:sans-serif; padding:20px }
table { width:100%; border-collapse:collapse }
th, td { padding:10px; border-bottom:1px solid #333 }
.ok { color:#4caf50 }
.bad { color:#ff5252 }
</style>
</head>
<body>
<h2>Cloudflare DDNS Stato DNS</h2>
<table>
<tr>
<th>Record</th>
<th>DNS IP</th>
<th>IP Pubblico</th>
<th>Proxy</th>
<th>Stato</th>
</tr>
{% for r in records %}
<tr>
<td>{{ r.name }}</td>
<td>{{ r.dns_ip }}</td>
<td>{{ r.public_ip }}</td>
<td>{{ "ON" if r.proxied else "OFF" }}</td>
<td class="{{ 'ok' if r.status == 'OK' else 'bad' }}">
{{ r.status }}
</td>
</tr>
{% endfor %}
</table>
</body>
</html>