From 1cb904323ccedf5d4606e62ed358cc587ff5ed29 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Fri, 18 Oct 2019 12:44:54 +0200 Subject: luci-app-travelmate: sync with update 1.5.0 * mainly adds WPA3 support Signed-off-by: Dirk Brenken --- .../luasrc/view/travelmate/runtime.htm | 13 +++++++++-- .../luasrc/view/travelmate/wifi_scan.htm | 26 ++++++---------------- 2 files changed, 18 insertions(+), 21 deletions(-) (limited to 'applications/luci-app-travelmate/luasrc/view/travelmate') diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm index 90c3e2b77..228479966 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm @@ -1,5 +1,5 @@ <%# -Copyright 2017-2018 Dirk Brenken (dev@brenken.org) +Copyright 2017-2019 Dirk Brenken (dev@brenken.org) This is free software, licensed under the Apache License, Version 2.0 -%> @@ -28,6 +28,9 @@ This is free software, licensed under the Apache License, Version 2.0 input = json.data.faulty_stations; view.innerHTML = input || "-"; view = document.getElementById("value_6"); + input = json.data.wpa_capabilities; + view.innerHTML = input || "-"; + view = document.getElementById("value_7"); input = json.data.last_rundate; view.innerHTML = input || "-"; } @@ -128,11 +131,17 @@ This is free software, licensed under the Apache License, Version 2.0
- +
-
+
+ +
+ - +
+

diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm index 86846a571..6bb60795a 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm @@ -1,31 +1,18 @@ <%# -Copyright 2017-2018 Dirk Brenken (dev@brenken.org) +Copyright 2017-2019 Dirk Brenken (dev@brenken.org) This is free software, licensed under the Apache License, Version 2.0 -%> <%- - local sys = require("luci.sys") - local utl = require("luci.util") - local dev = luci.http.formvalue("device") - local iw = luci.sys.wifi.getiwinfo(dev) - local label = {translate("WPA"), translate("WPA2"), translate("WPA/WPA2")} + local sys = require("luci.sys") + local utl = require("luci.util") + local dev = luci.http.formvalue("device") + local iw = luci.sys.wifi.getiwinfo(dev) if not iw then luci.http.redirect(luci.dispatcher.build_url("admin/services/travelmate/stations")) end - function format_wifi_encryption(info) - if info.wep == true then - return translate("WEP") - elseif info.wpa > 0 then - return "%s (%s/%s)" %{label[info.wpa] or translate("Unknown"), table.concat(info.auth_suites), table.concat(info.group_ciphers)} - elseif info.enabled then - return translate("Unknown") - else - return translate("Open") - end - end - function percent_wifi_signal(info) local qc = info.quality or 0 local qm = info.quality_max or 0 @@ -59,7 +46,7 @@ This is free software, licensed under the Apache License, Version 2.0 <%=net.bssid and utl.pcdata(net.bssid)%>
- <%=format_wifi_encryption(net.encryption)%> + <%=net.encryption.description%>
<%=percent_wifi_signal(net)%> % @@ -70,6 +57,7 @@ This is free software, licensed under the Apache License, Version 2.0 + <%- if net.encryption.wpa then -%> -- cgit v1.2.3