applications/luci-splash: Show black-/whitelisted clients in luci-splash list output again
This commit is contained in:
parent
15956b81e2
commit
cc2c364198
1 changed files with 4 additions and 3 deletions
|
@ -505,7 +505,7 @@ function sync()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
uci:save("luci_splash_leases")
|
uci:save("luci_splash_leases")
|
||||||
|
|
||||||
-- Get the mac addresses of current leases
|
-- Get the mac addresses of current leases
|
||||||
|
@ -557,6 +557,7 @@ function list()
|
||||||
|
|
||||||
-- Print listings
|
-- Print listings
|
||||||
local leases = uci:get_all("luci_splash_leases")
|
local leases = uci:get_all("luci_splash_leases")
|
||||||
|
local blackwhitelist = uci:get_all("luci_splash")
|
||||||
|
|
||||||
print(string.format(
|
print(string.format(
|
||||||
"%-17s %-15s %-9s %-4s %-7s %20s",
|
"%-17s %-15s %-9s %-4s %-7s %20s",
|
||||||
|
@ -579,8 +580,8 @@ function list()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Whitelist, Blacklist
|
-- Whitelist, Blacklist
|
||||||
for _, s in utl.spairs(leases,
|
for _, s in utl.spairs(blackwhitelist,
|
||||||
function(a,b) return leases[a][".type"] > leases[b][".type"] end
|
function(a,b) return blackwhitelist[a][".type"] > blackwhitelist[b][".type"] end
|
||||||
) do
|
) do
|
||||||
if (s[".type"] == "whitelist" or s[".type"] == "blacklist") and s.mac then
|
if (s[".type"] == "whitelist" or s[".type"] == "blacklist") and s.mac then
|
||||||
local mac = s.mac:lower()
|
local mac = s.mac:lower()
|
||||||
|
|
Loading…
Reference in a new issue