2 LuCI - Lua Configuration Interface
4 Copyright 2008 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
14 module("luci.controller.admin.network", package.seeall)
18 local uci = require("luci.model.uci").cursor()
19 local i18n = luci.i18n.translate
21 local page = node("admin", "network")
22 page.target = alias("admin", "network", "network")
23 page.title = i18n("network")
27 local page = node("admin", "network", "vlan")
28 page.target = cbi("admin_network/vlan")
29 page.title = i18n("a_n_switch")
32 local page = entry({"admin", "network", "wireless"}, arcombine(cbi("admin_network/wireless"), cbi("admin_network/wifi")), i18n("wifi"), 15)
37 uci:foreach("wireless", "wifi-device",
39 local ifc = section[".name"]
40 entry({"admin", "network", "wireless", ifc},
42 ifc:upper()).i18n = "wifi"
46 local page = entry({"admin", "network", "network"}, arcombine(cbi("admin_network/network"), cbi("admin_network/ifaces")), i18n("interfaces", "Schnittstellen"), 10)
50 uci:foreach("network", "interface",
52 local ifc = section[".name"]
53 if ifc ~= "loopback" then
54 entry({"admin", "network", "network", ifc},
61 local page = node("admin", "network", "dhcp")
62 page.target = cbi("admin_network/dhcp")
68 {"admin", "network", "dhcp", "leases"},
69 cbi("admin_network/dhcpleases"),
73 local page = node("admin", "network", "hosts")
74 page.target = cbi("admin_network/hosts")
75 page.title = i18n("hostnames", "Hostnames")
78 local page = node("admin", "network", "routes")
79 page.target = cbi("admin_network/routes")
80 page.title = i18n("a_n_routes")
85 {"admin", "network", "routes", "static"},
87 i18n("a_n_routes_static")
91 {"admin", "network", "conntrack"},
92 form("admin_network/conntrack"),
93 i18n("a_n_conntrack"),