2 LuCI - Lua Development Framework
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 require = require
16 module "luci.controller.niu.network"
19 local toniu = {on_success_to={"niu"}}
21 local e = entry({"niu", "network"}, alias("niu"), "Network", 10)
22 e.niu_dbtemplate = "niu/network"
24 e.niu_dbicon = "icons32/network-workgroup.png"
26 entry({"niu", "network", "wan"},
27 cbi("niu/network/wan", toniu), "Configure Internet Connection", 1)
29 entry({"niu", "network", "lan"},
30 cbi("niu/network/lan", toniu), "Configure Local Network", 2)
32 uci.inst_state:foreach("dhcp", "dhcp", function(s)
33 if s.interface == "lan" and s.ignore ~= "1" then
34 entry({"niu", "network", "assign"}, cbi("niu/network/assign",
35 toniu), "Display and Customize Address Assignment", 30)
39 entry({"niu", "network", "routes"}, cbi("niu/network/routes",
40 toniu), "Display and Customize Routing", 40)
42 entry({"niu", "network", "conntrack"}, call("cnntrck"),
43 "Display Local Network Activity", 50)
45 if fs.access("/etc/config/ddns") then
46 entry({"niu", "network", "ddns"}, cbi("niu/network/ddns", toniu),
47 "Configure Dynamic-DNS names", 60)
52 require "luci.template".render("niu/network/conntrack")