mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Bridge wizard complete
This commit is contained in:
parent
072b419af4
commit
1ee2be27d3
8 changed files with 110 additions and 43 deletions
|
|
@ -3178,6 +3178,26 @@ function isCaptivePortalActive(ifstats, prefs)
|
|||
return is_bridge_iface and prefs["is_captive_portal_enabled"] and isCaptivePortalSupported(ifstats, prefs)
|
||||
end
|
||||
|
||||
function getCaptivePortalUsers()
|
||||
local keys = ntop.getKeysCache("ntopng.user.*.host_pool_id")
|
||||
local users = {}
|
||||
|
||||
for key in pairs(keys or {}) do
|
||||
local host_pool = ntop.getCache(key)
|
||||
|
||||
if not isEmptyString(host_pool) then
|
||||
local username = split(key, "%.")[3]
|
||||
users[username] = host_pool
|
||||
end
|
||||
end
|
||||
|
||||
return users
|
||||
end
|
||||
|
||||
function getBridgeInitializedKey()
|
||||
return "ntopng.prefs.bridge_initialized"
|
||||
end
|
||||
|
||||
function hasSnmpDevices(ifid)
|
||||
if (not ntop.isEnterprise()) or (not isAdministrator()) then
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue