Missing Network/Pool Alert Filter #6418

This commit is contained in:
uccidibuti 2022-03-30 19:58:26 +02:00
parent 78d84add62
commit e204bf01d4
12 changed files with 154 additions and 4 deletions

View file

@ -2268,6 +2268,26 @@ end
-- ##############################################
function getLocalNetworkAliasById(network)
local networks_stats = interface.getNetworksStats()
-- If network is (u_int8_t)-1 then return an empty value
if network == "65535" then
return ''
end
local label = ''
for n, ns in pairs(networks_stats) do
if ns.network_id == tonumber(network) then
label = getFullLocalNetworkName(ns.network_key)
end
end
return label
end
-- ##############################################
function getLocalNetworkAlias(network)
local alias = ntop.getLocalNetworkAlias(network) or nil