summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-mini/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-03-24 00:02:26 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-03-24 00:02:26 +0000
commita6722be769be20d3e06d0ca77eac1bd3af6f9593 (patch)
tree3be865e14ac78f3177d0a9d3f2fb828942ce9886 /modules/admin-mini/luasrc
parent61f22c5b3979f6c0796646968cded799bcf19c57 (diff)
modules/admin-mini: luci_ethers -> dhcp conversation
Diffstat (limited to 'modules/admin-mini/luasrc')
-rw-r--r--modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua23
1 files changed, 10 insertions, 13 deletions
diff --git a/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua b/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua
index 8c405ca59..62bfe5721 100644
--- a/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua
+++ b/modules/admin-mini/luasrc/model/cbi/mini/dhcp.lua
@@ -59,9 +59,6 @@ time:depends("ignore", "0")
time.rmempty = true
-
-m2 = Map("luci_ethers", translate("Leases"))
-
local leasefn, leasefp, leases
uci:foreach("dhcp", "dnsmasq",
function(section)
@@ -77,11 +74,9 @@ if leasefp then
end
if leases then
- v = m2:section(Table, leases, translate("Active Leases"))
+ v = m:section(Table, leases, translate("Active Leases"))
ip = v:option(DummyValue, 3, translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address"))
-
mac = v:option(DummyValue, 2, translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
-
ltime = v:option(DummyValue, 1, translate("Leasetime remaining"))
function ltime.cfgvalue(self, ...)
local value = DummyValue.cfgvalue(self, ...)
@@ -89,13 +84,14 @@ if leases then
end
end
-s = m2:section(TypedSection, "static_lease", translate("Static Leases"))
-s.addremove = true
-s.anonymous = true
-s.template = "cbi/tblsection"
+s2 = m:section(TypedSection, "host", translate("Static Leases"))
+s2.addremove = true
+s2.anonymous = true
+s2.template = "cbi/tblsection"
-mac = s:option(Value, "macaddr", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
-ip = s:option(Value, "ipaddr", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address"))
+name = s2:option(Value, "name", translate("Hostname"))
+mac = s2:option(Value, "mac", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
+ip = s2:option(Value, "ip", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address"))
sys.net.arptable(function(entry)
ip:value(entry["IP address"])
mac:value(
@@ -104,4 +100,5 @@ sys.net.arptable(function(entry)
)
end)
-return m, m2
+return m
+