2 LuCI - Lua Configuration Interface
4 Copyright 2009 Steven Barth <steven@midlink.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 local niulib = require "luci.niulib"
17 m = Map("network", "Configure Internet Connection")
18 s = m:section(NamedSection, "wan", "interface", "Internet Connection Device")
22 s:tab("general", translate("General Settings"))
23 s:tab("expert", translate("Expert Settings"))
25 l = s:taboption("general", ListValue, "_wandev", "Internet Connection via")
27 for _, ifc in ipairs(niulib.eth_get_available("wan")) do
28 l:value("ethernet:%s" % ifc, "Cable / DSL / Ethernet-Adapter (%s)" % ifc)
31 for _, wifi in ipairs(niulib.wifi_get_available("client")) do
32 l:value("wlan:%s" % wifi, "WLAN-Adapter (%s)" % wifi)
35 for _, ifc in ipairs(niulib.eth_get_bridged("lan")) do
36 l:value("ethernet:!%s" % ifc, "Used Ethernet-Adapter (%s)" % ifc, {_showused = "1"})
39 l:value("none", "No Internet Connection")
41 v = s:taboption("expert", ListValue, "_showused", translate("Show ethernet adapters in use"))
42 v:value("", translate("never"))
43 v:value("1", translate("from LAN-bridge, unbridge on-demand"))