projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NIU: Allow automatic unbridging of LAN ethernet for WAN use
[project/luci.git]
/
modules
/
niu
/
luasrc
/
model
/
cbi
/
niu
/
network
/
wandevice.lua
diff --git
a/modules/niu/luasrc/model/cbi/niu/network/wandevice.lua
b/modules/niu/luasrc/model/cbi/niu/network/wandevice.lua
index
9287ba8
..
8917b97
100644
(file)
--- a/
modules/niu/luasrc/model/cbi/niu/network/wandevice.lua
+++ b/
modules/niu/luasrc/model/cbi/niu/network/wandevice.lua
@@
-19,7
+19,10
@@
s = m:section(NamedSection, "wan", "interface", "Internet Connection Device")
s.anonymous = true
s.addremove = false
s.anonymous = true
s.addremove = false
-l = s:option(ListValue, "_wandev", "Internet Connection via")
+s:tab("general", translate("General Settings"))
+s:tab("expert", translate("Expert Settings"))
+
+l = s:taboption("general", ListValue, "_wandev", "Internet Connection via")
for _, ifc in ipairs(niulib.eth_get_available("wan")) do
l:value("ethernet:%s" % ifc, "Cable / DSL / Ethernet-Adapter (%s)" % ifc)
for _, ifc in ipairs(niulib.eth_get_available("wan")) do
l:value("ethernet:%s" % ifc, "Cable / DSL / Ethernet-Adapter (%s)" % ifc)
@@
-29,7
+32,16
@@
for _, wifi in ipairs(niulib.wifi_get_available("client")) do
l:value("wlan:%s" % wifi, "WLAN-Adapter (%s)" % wifi)
end
l:value("wlan:%s" % wifi, "WLAN-Adapter (%s)" % wifi)
end
+for _, ifc in ipairs(niulib.eth_get_bridged("lan")) do
+ l:value("ethernet:!%s" % ifc, "Used Ethernet-Adapter (%s)" % ifc, {_showused = "1"})
+end
l:value("none", "No Internet Connection")
l:value("none", "No Internet Connection")
+v = s:taboption("expert", ListValue, "_showused", translate("Show ethernet adapters in use"))
+v:value("", translate("never"))
+v:value("1", translate("from LAN-bridge, unbridge on-demand"))
+
+
+
return m
return m