From: Jo-Philipp Wich Date: Wed, 24 Mar 2010 00:02:26 +0000 (+0000) Subject: modules/admin-mini: luci_ethers -> dhcp conversation X-Git-Tag: 0.10.0~781 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=a6722be769be20d3e06d0ca77eac1bd3af6f9593 modules/admin-mini: luci_ethers -> dhcp conversation --- 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 +