modules/admin-mini: luci_ethers -> dhcp conversation
This commit is contained in:
parent
61f22c5b39
commit
a6722be769
1 changed files with 10 additions and 13 deletions
|
@ -59,9 +59,6 @@ time:depends("ignore", "0")
|
||||||
time.rmempty = true
|
time.rmempty = true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
m2 = Map("luci_ethers", translate("Leases"))
|
|
||||||
|
|
||||||
local leasefn, leasefp, leases
|
local leasefn, leasefp, leases
|
||||||
uci:foreach("dhcp", "dnsmasq",
|
uci:foreach("dhcp", "dnsmasq",
|
||||||
function(section)
|
function(section)
|
||||||
|
@ -77,11 +74,9 @@ if leasefp then
|
||||||
end
|
end
|
||||||
|
|
||||||
if leases then
|
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"))
|
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"))
|
mac = v:option(DummyValue, 2, translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
|
||||||
|
|
||||||
ltime = v:option(DummyValue, 1, translate("Leasetime remaining"))
|
ltime = v:option(DummyValue, 1, translate("Leasetime remaining"))
|
||||||
function ltime.cfgvalue(self, ...)
|
function ltime.cfgvalue(self, ...)
|
||||||
local value = DummyValue.cfgvalue(self, ...)
|
local value = DummyValue.cfgvalue(self, ...)
|
||||||
|
@ -89,13 +84,14 @@ if leases then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
s = m2:section(TypedSection, "static_lease", translate("Static Leases"))
|
s2 = m:section(TypedSection, "host", translate("Static Leases"))
|
||||||
s.addremove = true
|
s2.addremove = true
|
||||||
s.anonymous = true
|
s2.anonymous = true
|
||||||
s.template = "cbi/tblsection"
|
s2.template = "cbi/tblsection"
|
||||||
|
|
||||||
mac = s:option(Value, "macaddr", translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"))
|
name = s2:option(Value, "name", translate("Hostname"))
|
||||||
ip = s:option(Value, "ipaddr", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address"))
|
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)
|
sys.net.arptable(function(entry)
|
||||||
ip:value(entry["IP address"])
|
ip:value(entry["IP address"])
|
||||||
mac:value(
|
mac:value(
|
||||||
|
@ -104,4 +100,5 @@ sys.net.arptable(function(entry)
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
return m, m2
|
return m
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue