summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-travelmate/luasrc/view/travelmate
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2019-10-18 12:44:54 +0200
committerDirk Brenken <dev@brenken.org>2019-10-18 12:44:54 +0200
commit1cb904323ccedf5d4606e62ed358cc587ff5ed29 (patch)
treef3dace43aa6722bb56b8d786922e0e79e0382925 /applications/luci-app-travelmate/luasrc/view/travelmate
parent36887747d5a20388bc3abf929f419cf5ca925387 (diff)
luci-app-travelmate: sync with update 1.5.0
* mainly adds WPA3 support Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-travelmate/luasrc/view/travelmate')
-rw-r--r--applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm13
-rw-r--r--applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm26
2 files changed, 18 insertions, 21 deletions
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
</div>
</div>
<div class="cbi-value" id="status_6">
- <label class="cbi-value-title" for="status_6"><%:Last Run%></label>
+ <label class="cbi-value-title" for="status_6"><%:WPA Capabilities%></label>
<div class="cbi-value-field">
<span class="runtime" id="value_6">-</span>
</div>
</div>
+<div class="cbi-value" id="status_7">
+ <label class="cbi-value-title" for="status_7"><%:Last Run%></label>
+ <div class="cbi-value-field">
+ <span class="runtime" id="value_7">-</span>
+ </div>
+</div>
<hr />
<div class="cbi-value" id="button_1">
<label class="cbi-value-title" for="button_1"><%:Restart Travelmate%></label>
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)%>
</div>
<div class="td left" style="text-align: left !important">
- <%=format_wifi_encryption(net.encryption)%>
+ <%=net.encryption.description%>
</div>
<div class="td left" style="text-align: left !important">
<%=percent_wifi_signal(net)%> %
@@ -70,6 +57,7 @@ This is free software, licensed under the Apache License, Version 2.0
<input type="hidden" name="device" value="<%=utl.pcdata(dev)%>"/>
<input type="hidden" name="ssid" value="<%=utl.pcdata(net.ssid)%>"/>
<input type="hidden" name="bssid" value="<%=utl.pcdata(net.bssid)%>"/>
+ <input type="hidden" name="description" value="<%=net.encryption.description%>"/>
<input type="hidden" name="wep" value="<%=net.encryption.wep and 1 or 0%>"/>
<%- if net.encryption.wpa then -%>
<input type="hidden" name="wpa_version" value="<%=net.encryption.wpa%>"/>