From 0e59b67bbd84e81415af59a2e7c7030e862ffaa4 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 4 Nov 2024 10:27:06 -0800 Subject: [PATCH] networks: Fix display of strength and channel for Wi-Fi connections - Currently, strength and channel information is not shown for Wi-Fi connections in connection information page. This is a regression related to handling SSID as a binary string. Fix this. - Also fix the styling to not make signal strength too prominent. Tests: - On a machine with Wi-Fi network device. Viewing the Wi-Fi connection information does not signal strength and channel without patch but show with the patch. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- plinth/modules/networks/templates/connection_show.html | 2 +- plinth/network.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/networks/templates/connection_show.html b/plinth/modules/networks/templates/connection_show.html index 28538e5f4..9360ddbc1 100644 --- a/plinth/modules/networks/templates/connection_show.html +++ b/plinth/modules/networks/templates/connection_show.html @@ -152,7 +152,7 @@ {% if access_point.channel %}
{% trans "Signal strength" %} - + {{ access_point.strength }}%
diff --git a/plinth/network.py b/plinth/network.py index 3bb0000c8..bbc5f5832 100644 --- a/plinth/network.py +++ b/plinth/network.py @@ -183,7 +183,7 @@ def get_status_from_wifi_access_point(device, ssid): for access_point in device.get_access_points(): if access_point and access_point.get_ssid() and \ - access_point.get_ssid().get_data() == ssid: + access_point.get_ssid().get_data().decode() == ssid: status['strength'] = access_point.get_strength() frequency = access_point.get_frequency() status['channel'] = _get_wifi_channel_from_frequency(frequency)