Development
This commit is contained in:
parent
d78209e18d
commit
ec4f7dd90e
2 changed files with 10 additions and 3 deletions
|
|
@ -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'<div class="info-bar info-bar-inline info-bar-{variant}">{text}</div>'
|
||||
|
||||
radius_client_reservations = [
|
||||
r for r in all_radius_clients
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue