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")
26 local page = node("admin", "network", "vlan")
27 page.target = cbi("admin_network/vlan")
28 page.title = i18n("a_n_switch")
31 local page = node("admin", "network", "wireless")
32 page.target = form("admin_network/wireless")
33 page.title = i18n("wifi")
35 uci:foreach("wireless", "wifi-device",
37 local ifc = section[".name"]
38 entry({"admin", "network", "wireless", ifc},
39 alias("admin", "network", "wifi", ifc),
44 local page = node("admin", "network", "wifi")
45 page.target = cbi("admin_network/wifi")
48 local page = node("admin", "network", "network")
49 page.target = cbi("admin_network/network")
50 page.title = i18n("interfaces", "Schnittstellen")
52 uci:foreach("network", "interface",
54 local ifc = section[".name"]
55 if ifc ~= "loopback" then
56 entry({"admin", "network", "network", ifc},
57 alias("admin", "network", "ifaces", ifc),
63 local page = node("admin", "network", "ifaces")
64 page.target = cbi("admin_network/ifaces")
67 local page = node("admin", "network", "dhcp")
68 page.target = cbi("admin_network/dhcp")
73 {"admin", "network", "dhcp", "leases"},
74 cbi("admin_network/dhcpleases"),
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")