From 84d6646bb4b9ff681fe434d34781971bd4c72706 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 4 Aug 2008 23:48:41 +0000 Subject: modules/admin-full, modules/admin-mini: Added eyecandy ;-) --- modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua | 9 +++++++-- modules/admin-mini/luasrc/model/cbi/mini/network.lua | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'modules/admin-mini/luasrc/model/cbi/mini') diff --git a/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua b/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua index 05334049da..3d26d6a9d6 100644 --- a/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua +++ b/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua @@ -59,7 +59,12 @@ s.addremove = true s.anonymous = true s.template = "cbi/tblsection" -s:option(Value, "macaddr", translate("macaddress")) -s:option(Value, "ipaddr", translate("ipaddress")) +mac = s:option(Value, "macaddr", translate("macaddress")) +ip = s:option(Value, "ipaddr", translate("ipaddress")) +for i, dataset in ipairs(luci.sys.net.arptable()) do + ip:value(dataset["IP address"]) + mac:value(dataset["HW address"], + dataset["HW address"] .. " (" .. dataset["IP address"] .. ")") +end return m, m2 \ No newline at end of file diff --git a/modules/admin-mini/luasrc/model/cbi/mini/network.lua b/modules/admin-mini/luasrc/model/cbi/mini/network.lua index e2d4e3c0c5..2e1d7955f9 100644 --- a/modules/admin-mini/luasrc/model/cbi/mini/network.lua +++ b/modules/admin-mini/luasrc/model/cbi/mini/network.lua @@ -16,7 +16,12 @@ m = Map("network", "Network") s = m:section(NamedSection, "lan", "interface", translate("m_n_local")) s:option(Value, "ipaddr", translate("ipaddress")) -s:option(Value, "netmask", translate("netmask")) + +nm = s:option(Value, "netmask", translate("netmask")) +nm:value("255.255.255.0") +nm:value("255.255.0.0") +nm:value("255.0.0.0") + gw = s:option(Value, "gateway", translate("gateway") .. translate("cbi_optional")) gw.rmempty = true dns = s:option(Value, "dns", translate("dnsserver") .. translate("cbi_optional")) -- cgit v1.2.3