Added getPoolName() call for mapping pool id's to their corresponding name

This commit is contained in:
Luca Deri 2022-01-28 23:45:47 +01:00
parent efe5fa5e29
commit c694f51e5d

View file

@ -4264,6 +4264,16 @@ function areHostPoolsTimeseriesEnabled(ifid)
return(ntop.isPro() and (ntop.getPref("ntopng.prefs.host_pools_rrd_creation") == "1"))
end
function getPoolName(pool_id)
if(pool_id == "0") then
return "Default"
else
local key = "ntopng.prefs.host_pools.details."..pool_id
return ntop.getHashCache(key, "name")
end
end
function areASTimeseriesEnabled(ifid)
return(ntop.getPref("ntopng.prefs.asn_rrd_creation") == "1")
end