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 <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa authored and Veiko Aasa committed 2024-11-07 08:41:04 +02:00
1 parent 7fa664d445
commit 0e59b67bbd
2 files changed
+2 -2

No files matched your search

@@ -152,7 +152,7 @@
{% if access_point.channel %}
<div class="list-group-item">
<span class="primary">{% trans "Signal strength" %}</span>
<span class="btn btn-primary btn-sm secondary">
<span class="badge badge-secondary secondary">
{{ access_point.strength }}%
</span>
</div>
+1 -1
View File
@@ -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)