summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-mini/luasrc/model/cbi/mini
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-04 23:48:41 +0000
committerSteven Barth <steven@midlink.org>2008-08-04 23:48:41 +0000
commit84d6646bb4b9ff681fe434d34781971bd4c72706 (patch)
tree6f8522e4f36a6fb972501b9a3444b02ecaae763b /modules/admin-mini/luasrc/model/cbi/mini
parentad04a8212508522a5ef23e62ec22dc961c16f196 (diff)
modules/admin-full, modules/admin-mini: Added eyecandy ;-)
Diffstat (limited to 'modules/admin-mini/luasrc/model/cbi/mini')
-rw-r--r--modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua9
-rw-r--r--modules/admin-mini/luasrc/model/cbi/mini/network.lua7
2 files changed, 13 insertions, 3 deletions
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"))