mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
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:
parent
7fa664d445
commit
0e59b67bbd
@ -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>
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user