Optimize stats update in Hosts page (#6372)

This commit is contained in:
Alfredo Cardigliano 2022-03-09 17:58:57 +01:00
parent 8032fb36ae
commit 3b0a3041a7
4 changed files with 90 additions and 50 deletions

View file

@ -2395,12 +2395,17 @@ end
function hostkey2hostinfo(key)
local host = {}
local info = split(key,"@")
if(info[1] ~= nil) then host["host"] = info[1] end
if(info[1] ~= nil) then
host["host"] = info[1]
end
if(info[2] ~= nil) then
host["vlan"] = tonumber(info[2])
else
host["vlan"] = 0
end
return host
end