From 2b200cfa792ab159247243dc2d7e961c10cb1a4d Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Wed, 10 Jan 2018 19:48:01 +0100 Subject: [PATCH] luci-app-travelmate: sync with travelmate 1.0.2 * refine status view * add two missing eap auth variants * small visual fixes Signed-off-by: Dirk Brenken --- .../model/cbi/travelmate/overview_tab.lua | 14 +++++++++----- .../luasrc/model/cbi/travelmate/wifi_add.lua | 2 ++ .../luasrc/model/cbi/travelmate/wifi_edit.lua | 4 +++- .../luasrc/view/travelmate/runtime.htm | 4 ++-- .../luasrc/view/travelmate/stations.htm | 18 +++++++++--------- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua index e715a2ba06..1ea2d66723 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua @@ -1,4 +1,4 @@ --- Copyright 2017 Dirk Brenken (dev@brenken.org) +-- Copyright 2017-2018 Dirk Brenken (dev@brenken.org) -- This is free software, licensed under the Apache License, Version 2.0 local fs = require("nixio.fs") @@ -113,17 +113,21 @@ end ds = m:section(NamedSection, "global", "travelmate", translate("Runtime Information")) -dv1 = ds:option(DummyValue, "status", translate("Online Status")) +dv1 = ds:option(DummyValue, "status", translate("Travelmate Status")) dv1.template = "travelmate/runtime" if parse == nil then dv1.value = translate("n/a") -elseif parse.data.station_connection == "true" then +elseif parse.data.travelmate_status == "connected" then dv1.value = translate("connected") -else +elseif parse.data.travelmate_status == "not connected" then dv1.value = translate("not connected") +elseif parse.data.travelmate_status == "running" then + dv1.value = translate("running") +elseif parse.data.travelmate_status == "error" then + dv1.value = translate("error") end -dv2 = ds:option(DummyValue, "travelmate_version", translate("Travelmate version")) +dv2 = ds:option(DummyValue, "travelmate_version", translate("Travelmate Version")) dv2.template = "travelmate/runtime" if parse ~= nil then dv2.value = parse.data.travelmate_version or translate("n/a") diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua index 1e8bd7ec68..93e8a05cf8 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua @@ -101,6 +101,8 @@ elseif (tonumber(m.hidden.wpa_version) or 0) > 0 then authentication:value("EAP-MD5") authentication:value("EAP-MSCHAPV2") authentication:value("EAP-TLS") + authentication:value("auth=PAP") + authentication:value("auth=MSCHAPV2") authentication.default = "EAP-MSCHAPV2" ident = m:field(Value, "identity", translate("Identity")) diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua index b8e0f11b3a..ee4d342ea1 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua @@ -1,4 +1,4 @@ --- Copyright 2017 Dirk Brenken (dev@brenken.org) +-- Copyright 2017-2018 Dirk Brenken (dev@brenken.org) -- This is free software, licensed under the Apache License, Version 2.0 local fs = require("nixio.fs") @@ -92,6 +92,8 @@ if s ~= nil then authentication:value("EAP-MD5") authentication:value("EAP-MSCHAPV2") authentication:value("EAP-TLS") + authentication:value("auth=PAP") + authentication:value("auth=MSCHAPV2") authentication.default = s.auth or "EAP-MSCHAPV2" ident = m:field(Value, "identity", translate("Identity")) diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm index 2b9885567a..e7827b5c31 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/runtime.htm @@ -1,10 +1,10 @@ <%# -Copyright 2017 Dirk Brenken (dev@brenken.org) +Copyright 2017-2018 Dirk Brenken (dev@brenken.org) This is free software, licensed under the Apache License, Version 2.0 -%> <%+cbi/valueheader%> - + <%+cbi/valuefooter%> diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm index 11c36d427c..ae1ea797a2 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm @@ -1,5 +1,5 @@ <%# -Copyright 2017 Dirk Brenken (dev@brenken.org) +Copyright 2017-2018 Dirk Brenken (dev@brenken.org) This is free software, licensed under the Apache License, Version 2.0 -%> @@ -36,21 +36,21 @@ This is free software, licensed under the Apache License, Version 2.0 local bssid = s.bssid or "-" local encryption = s.encryption or "-" local disabled = s.disabled or "" - local style = "color:#000000" + local style = "text-align:left;color:#000000" if disabled == "0" then - style = "color:#0069d6;font-weight:bold" + style = "text-align:left;color:#0069d6;font-weight:bold" end %> - <%=device%> - <%=ssid%> - <%=bssid%> - <%=encryption%> - + <%=device%> + <%=ssid%> + <%=bssid%> + <%=encryption%> + - + -- 2.30.2