From ec4f7dd90e1ae136978666f14bcd59298effbd8c Mon Sep 17 00:00:00 2001 From: Matthew Grotke Date: Sun, 7 Jun 2026 19:15:03 -0400 Subject: [PATCH] Development --- docker/routlin-dash/app/pages/radius/content.json | 6 +++++- docker/routlin-dash/app/pages/radius/view.py | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docker/routlin-dash/app/pages/radius/content.json b/docker/routlin-dash/app/pages/radius/content.json index a887440..0ad562b 100644 --- a/docker/routlin-dash/app/pages/radius/content.json +++ b/docker/routlin-dash/app/pages/radius/content.json @@ -21,7 +21,11 @@ { "type": "info_bar", "variant": "info", - "text": "%RADIUS_CLIENT_STATUS_TEXT%" + "text": "You should only enable RADIUS if you also configure your managed switch and/or Wireless Access Points to consult RADIUS. RADIUS will be disabled if there are no RADIUS Clients (authenticators) specified on the DHCP Reservations page." + }, + { + "type": "raw_html", + "html": "%RADIUS_STATUS_BAR%" }, { "type": "card", diff --git a/docker/routlin-dash/app/pages/radius/view.py b/docker/routlin-dash/app/pages/radius/view.py index 5862fd5..7ffe453 100644 --- a/docker/routlin-dash/app/pages/radius/view.py +++ b/docker/routlin-dash/app/pages/radius/view.py @@ -104,9 +104,12 @@ def collect_tokens(cfg): all_radius_clients = [r for r in cfg.get('dhcp_reservations', []) if r.get('radius_client') is True] n = len(all_radius_clients) if n > 0: - tokens['RADIUS_CLIENT_STATUS_TEXT'] = f"RADIUS will be disabled if there are no RADIUS Clients (authenticators) specified on the DHCP Reservations page. There are currently {n} RADIUS Client{'s' if n != 1 else ''}. RADIUS is enabled." + variant = 'success' + text = f"There are currently {n} RADIUS Client{'s' if n != 1 else ''}. RADIUS is enabled." else: - tokens['RADIUS_CLIENT_STATUS_TEXT'] = "RADIUS will be disabled if there are no RADIUS Clients (authenticators) specified on the DHCP Reservations page. There are currently 0 RADIUS Clients. RADIUS is disabled." + variant = 'warning' + text = "There are currently 0 RADIUS Clients. RADIUS is disabled." + tokens['RADIUS_STATUS_BAR'] = f'
{text}
' radius_client_reservations = [ r for r in all_radius_clients