From a6722be769be20d3e06d0ca77eac1bd3af6f9593 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 24 Mar 2010 00:02:26 +0000 Subject: [PATCH] modules/admin-mini: luci_ethers -> dhcp conversation --- .../admin-mini/luasrc/model/cbi/mini/dhcp.lua | 23 ++++++++----------- 1 file 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("IPv4-Address")) - mac = v:option(DummyValue, 2, translate("MAC-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("MAC-Address")) -ip = s:option(Value, "ipaddr", translate("IPv4-Address")) +name = s2:option(Value, "name", translate("Hostname")) +mac = s2:option(Value, "mac", translate("MAC-Address")) +ip = s2:option(Value, "ip", translate("IPv4-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 + -- 2.25.1