Display manually set host aliases in traffic report top talkers

Fixes #1419
This commit is contained in:
emanuele-f 2017-09-11 11:19:47 +02:00
parent 2f12e1fd1b
commit f515d93316

View file

@ -58,6 +58,10 @@ local function printTopTalkersTable(tbl)
rsp = rsp..'"'..k..'": '
if(k == "value") then
rsp = rsp..tostring(v)
elseif(k == "label") then
local alt_name = getHostAltName(rv["address"])
if isEmptyString(alt_name) or (alt_name == rv["address"]) then alt_name = rv["label"] end
rsp = rsp..'"'..alt_name..'"'
else
rsp = rsp..'"'..v..'"'
end