Cleanup overview / details nodes
[project/luci.git] / modules / admin-full / luasrc / controller / admin / network.lua
index e3f80a1..a14b8fd 100644 (file)
@@ -22,54 +22,47 @@ function index()
        page.target = alias("admin", "network", "network")
        page.title  = i18n("network")
        page.order  = 50
+       page.index  = true
 
        local page  = node("admin", "network", "vlan")
        page.target = cbi("admin_network/vlan")
        page.title  = i18n("a_n_switch")
        page.order  = 20
-
-       local page  = node("admin", "network", "wireless")
-       page.target = form("admin_network/wireless")
-       page.title  = i18n("wifi")
+       
+       local page = entry({"admin", "network", "wireless"}, arcombine(cbi("admin_network/wireless"), cbi("admin_network/wifi")), i18n("wifi"), 15)
        page.i18n   = "wifi"
-       page.order  = 15
+       page.leaf = true
+       page.subindex = true
+       
        uci:foreach("wireless", "wifi-device",
                function (section)
                        local ifc = section[".name"]
                                entry({"admin", "network", "wireless", ifc},
-                                alias("admin", "network", "wifi", ifc),
+                                true,
                                 ifc:upper()).i18n = "wifi"
                end
        )
-
-       local page  = node("admin", "network", "wifi")
-       page.target = cbi("admin_network/wifi")
+       
+       local page = entry({"admin", "network", "network"}, arcombine(cbi("admin_network/network"), cbi("admin_network/ifaces")), i18n("interfaces", "Schnittstellen"), 10)
        page.leaf   = true
-       page.i18n = "wifi"
-
-       local page  = node("admin", "network", "network")
-       page.target = cbi("admin_network/network")
-       page.title  = i18n("interfaces", "Schnittstellen")
-       page.order  = 10
+       page.subindex = true
+       
        uci:foreach("network", "interface",
                function (section)
                        local ifc = section[".name"]
                        if ifc ~= "loopback" then
                                entry({"admin", "network", "network", ifc},
-                                alias("admin", "network", "ifaces", ifc),
+                                true,
                                 ifc:upper())
                        end
                end
        )
 
-       local page  = node("admin", "network", "ifaces")
-       page.target = cbi("admin_network/ifaces")
-       page.leaf   = true
-
        local page  = node("admin", "network", "dhcp")
        page.target = cbi("admin_network/dhcp")
        page.title  = "DHCP"
        page.order  = 30
+       page.subindex = true
 
        entry(
         {"admin", "network", "dhcp", "leases"},
@@ -101,4 +94,4 @@ function index()
                60
        )
 
-end
+end
\ No newline at end of file