From f6b77ef7f09fcce65f716abe683c27a9c0a11160 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 25 Oct 2010 22:26:08 +0000 Subject: modules/admin-full: add realtime iface status to config page --- .../admin-full/luasrc/model/cbi/admin_network/ifaces.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'modules/admin-full/luasrc/model/cbi') diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua index 753779925b..916c26b4fb 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua @@ -45,6 +45,10 @@ if has_6in4 then s:tab("tunnel", translate("Tunnel Settings")) end s:tab("physical", translate("Physical Settings")) s:tab("firewall", translate("Firewall Settings")) +st = s:taboption("general", DummyValue, "__status", translate("Status")) +st.template = "admin_network/iface_status" +st.network = arg[1] + --[[ back = s:taboption("general", DummyValue, "_overview", translate("Overview")) back.value = "" @@ -161,12 +165,12 @@ function fwzone.write(self, section, value) end ipaddr = s:taboption("general", Value, "ipaddr", translate("IPv4-Address")) -ipaddr.rmempty = true +ipaddr.optional = true ipaddr.datatype = "ip4addr" ipaddr:depends("proto", "static") nm = s:taboption("general", Value, "netmask", translate("IPv4-Netmask")) -nm.rmempty = true +nm.optional = true nm.datatype = "ip4addr" nm:depends("proto", "static") nm:value("255.255.255.0") @@ -185,7 +189,7 @@ bcast:depends("proto", "static") if has_ipv6 then ip6addr = s:taboption("ipv6", Value, "ip6addr", translate("IPv6-Address"), translate("CIDR-Notation: address/prefix")) - ip6addr.rmempty = true + ip6addr.optional = true ip6addr.datatype = "ip6addr" ip6addr:depends("proto", "static") ip6addr:depends("proto", "6in4") @@ -196,11 +200,12 @@ if has_ipv6 then ip6gw:depends("proto", "static") end -dns = s:taboption("general", Value, "dns", translate("DNS-Server"), - translate("You can specify multiple DNS servers separated by space here. Servers entered here will override " .. +dns = s:taboption("general", DynamicList, "dns", translate("DNS-Server"), + translate("You can specify multiple DNS servers here, press enter to add a new entry. Servers entered here will override " .. "automatically assigned ones.")) dns.optional = true +dns.cast = "string" dns.datatype = "ipaddr" dns:depends("peerdns", "") -- cgit v1.2.3