From e20694340f065cf83d558391ae5f3a62a65b4476 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 11 Dec 2017 21:03:54 +0100 Subject: [PATCH] network selection: sort ssids, use radiobutton just one click on the right button, not 2 clicks as for dropdown menu. --- networkconfig.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/networkconfig.py b/networkconfig.py index 03b64a9..f2b8bf6 100644 --- a/networkconfig.py +++ b/networkconfig.py @@ -45,6 +45,9 @@ def send_response(client, payload, status_code=200): def handle_root(client): global wlan_sta + wlan_sta.active(True) + ssids = sorted(ssid.decode('utf-8') for ssid, *_ in wlan_sta.scan()) + response_header = """\

@@ -55,25 +58,22 @@ def handle_root(client):
- - - + + """.format(ssid)) + response_variable = "\n".join(response_variable) + + response_footer = """\ - +
- WiFi Name - - + response_variable = [] + for ssid in ssids: + response_variable.append("""\ +
+ {0}
PasswordPassword: