feat: UI redesign (CSS system, DNS widget, Traefik dashboard widget)

- Replace base.html style block with full CSS design system using custom properties (dark theme, cards, tables, badges, dots, widgets)
- Add DNS blueprint (fablednetmon/dns/) with /dns/ and /dns/rows routes + templates
- Add Traefik /widget route and widget.html fragment for dashboard
- Update dashboard: DNS + Traefik widgets, traefik_enabled config detection
- Update all templates to use new CSS classes (page-title, section-title, card-flush, table, badge-*, dot-*, btn-*)
- Register dns_bp in app.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-18 23:37:46 -04:00
parent d29c5b3eab
commit 165a202ba4
22 changed files with 495 additions and 236 deletions
+7 -8
View File
@@ -16,8 +16,7 @@ async def index():
# Latest ping per host
latest_ping_subq = (
select(PingResult.host_id, func.max(PingResult.probed_at).label("max_at"))
.group_by(PingResult.host_id)
.subquery()
.group_by(PingResult.host_id).subquery()
)
pr = await db.execute(
select(PingResult).join(
@@ -33,8 +32,7 @@ async def index():
# Latest DNS per host
latest_dns_subq = (
select(DnsResult.host_id, func.max(DnsResult.resolved_at).label("max_at"))
.group_by(DnsResult.host_id)
.subquery()
.group_by(DnsResult.host_id).subquery()
)
dr = await db.execute(
select(DnsResult).join(
@@ -49,14 +47,15 @@ async def index():
total_hosts = (await db.execute(select(func.count()).select_from(Host))).scalar()
plugins = current_app.config.get("PLUGINS", {})
traefik_enabled = plugins.get("traefik", {}).get("enabled", False)
poll_interval = current_app.config.get("MONITORS_POLL_INTERVAL", 60)
return await render_template(
"dashboard/index.html",
ping_up=ping_up,
ping_down=ping_down,
dns_ok=dns_ok,
dns_fail=dns_fail,
ping_up=ping_up, ping_down=ping_down,
dns_ok=dns_ok, dns_fail=dns_fail,
total_hosts=total_hosts,
traefik_enabled=traefik_enabled,
poll_interval=poll_interval,
)