Merge pull request #1524 from dibdot/travelmate

luci-app-travelmate: sync with travelmate 1.0.2
This commit is contained in:
Hannu Nyman 2018-01-10 23:45:50 +02:00 committed by GitHub
commit 8b39d9a76b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 17 deletions

View file

@ -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 -- This is free software, licensed under the Apache License, Version 2.0
local fs = require("nixio.fs") local fs = require("nixio.fs")
@ -113,17 +113,21 @@ end
ds = m:section(NamedSection, "global", "travelmate", translate("Runtime Information")) 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" dv1.template = "travelmate/runtime"
if parse == nil then if parse == nil then
dv1.value = translate("n/a") dv1.value = translate("n/a")
elseif parse.data.station_connection == "true" then elseif parse.data.travelmate_status == "connected" then
dv1.value = translate("connected") dv1.value = translate("connected")
else elseif parse.data.travelmate_status == "not connected" then
dv1.value = translate("not connected") 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 end
dv2 = ds:option(DummyValue, "travelmate_version", translate("Travelmate version")) dv2 = ds:option(DummyValue, "travelmate_version", translate("Travelmate Version"))
dv2.template = "travelmate/runtime" dv2.template = "travelmate/runtime"
if parse ~= nil then if parse ~= nil then
dv2.value = parse.data.travelmate_version or translate("n/a") dv2.value = parse.data.travelmate_version or translate("n/a")

View file

@ -101,6 +101,8 @@ elseif (tonumber(m.hidden.wpa_version) or 0) > 0 then
authentication:value("EAP-MD5") authentication:value("EAP-MD5")
authentication:value("EAP-MSCHAPV2") authentication:value("EAP-MSCHAPV2")
authentication:value("EAP-TLS") authentication:value("EAP-TLS")
authentication:value("auth=PAP")
authentication:value("auth=MSCHAPV2")
authentication.default = "EAP-MSCHAPV2" authentication.default = "EAP-MSCHAPV2"
ident = m:field(Value, "identity", translate("Identity")) ident = m:field(Value, "identity", translate("Identity"))

View file

@ -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 -- This is free software, licensed under the Apache License, Version 2.0
local fs = require("nixio.fs") local fs = require("nixio.fs")
@ -92,6 +92,8 @@ if s ~= nil then
authentication:value("EAP-MD5") authentication:value("EAP-MD5")
authentication:value("EAP-MSCHAPV2") authentication:value("EAP-MSCHAPV2")
authentication:value("EAP-TLS") authentication:value("EAP-TLS")
authentication:value("auth=PAP")
authentication:value("auth=MSCHAPV2")
authentication.default = s.auth or "EAP-MSCHAPV2" authentication.default = s.auth or "EAP-MSCHAPV2"
ident = m:field(Value, "identity", translate("Identity")) ident = m:field(Value, "identity", translate("Identity"))

View file

@ -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 This is free software, licensed under the Apache License, Version 2.0
-%> -%>
<%+cbi/valueheader%> <%+cbi/valueheader%>
<input name="runtime" id="runtime" type="text" class="cbi-input-text" style="border:none; box-shadow:none; background-color:#ffffff; color:#0069d6;" value="<%=self:cfgvalue(section)%>" disabled="disabled" /> <input name="runtime" id="runtime" type="text" class="cbi-input-text" style="outline:none;border:none;box-shadow:none;background:transparent;color:#0069d6;font-weight:bold;line-height:30px;height:30px;" value="<%=self:cfgvalue(section)%>" disabled="disabled" />
<%+cbi/valuefooter%> <%+cbi/valuefooter%>

View file

@ -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 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 bssid = s.bssid or "-"
local encryption = s.encryption or "-" local encryption = s.encryption or "-"
local disabled = s.disabled or "" local disabled = s.disabled or ""
local style = "color:#000000" local style = "text-align:left;color:#000000"
if disabled == "0" then if disabled == "0" then
style = "color:#0069d6;font-weight:bold" style = "text-align:left;color:#0069d6;font-weight:bold"
end end
%> %>
<tr class="cbi-section-table-row cbi-rowstyle-1" style="<%=style%>"> <tr class="cbi-section-table-row cbi-rowstyle-1" style="<%=style%>">
<td style="text-align:left"><%=device%></td> <td style="<%=style%>"><%=device%></td>
<td style="text-align:left"><%=ssid%></td> <td style="<%=style%>"><%=ssid%></td>
<td style="text-align:left"><%=bssid%></td> <td style="<%=style%>"><%=bssid%></td>
<td style="text-align:left"><%=encryption%></td> <td style="<%=style%>"><%=encryption%></td>
<td class="cbi-value-field" style="width:70px;text-align:right"> <td class="cbi-value-field" style="width:80px">
<input class="cbi-button cbi-button-up" type="button" value="" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifiorder')%>?cfg=<%=section%>;dir=up'" alt="<%:Move up%>" title="<%:Move up%>"/> <input class="cbi-button cbi-button-up" type="button" value="" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifiorder')%>?cfg=<%=section%>;dir=up'" alt="<%:Move up%>" title="<%:Move up%>"/>
<input class="cbi-button cbi-button-down" type="button" value="" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifiorder')%>?cfg=<%=section%>;dir=down'" alt="<%:Move down%>" title="<%:Move down%>"/> <input class="cbi-button cbi-button-down" type="button" value="" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifiorder')%>?cfg=<%=section%>;dir=down'" alt="<%:Move down%>" title="<%:Move down%>"/>
</td> </td>
<td class="cbi-value-field" style="width:150px;text-align:right"> <td class="cbi-value-field" style="width:150px">
<input type="button" class="cbi-button cbi-button-edit" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifiedit')%>?cfg=<%=section%>'" title="<%:Edit this Uplink%>" value="<%:Edit%>"/> <input type="button" class="cbi-button cbi-button-edit" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifiedit')%>?cfg=<%=section%>'" title="<%:Edit this Uplink%>" value="<%:Edit%>"/>
<input type="button" class="cbi-button cbi-button-remove" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifidelete')%>?cfg=<%=section%>'" title="<%:Delete this Uplink%>" value="<%:Delete%>"/> <input type="button" class="cbi-button cbi-button-remove" onclick="location.href='<%=luci.dispatcher.build_url('admin/services/travelmate/wifidelete')%>?cfg=<%=section%>'" title="<%:Delete this Uplink%>" value="<%:Delete%>"/>
</td> </td>