Implements Mac page AJAX refresh and configuration

Implements #1437
This commit is contained in:
Simone Mainardi 2017-09-11 19:06:11 +02:00
parent f515d93316
commit bb9883d423
8 changed files with 192 additions and 87 deletions

View file

@ -1544,7 +1544,11 @@ resolved_host_labels_cache = {}
-- host_ip can be a mac. host_mac can be null.
function getHostAltName(host_ip, host_mac)
local alt_name = resolved_host_labels_cache[host_ip]
local alt_name = nil
if not isEmptyString(host_ip) then
alt_name = resolved_host_labels_cache[host_ip]
end
-- cache hit
if(alt_name ~= nil) then
@ -1568,7 +1572,7 @@ function getHostAltName(host_ip, host_mac)
end
function setHostAltName(host_ip, alt_name)
ntop.setHashCache(getHostAltNamesKey(), host_ip, alt_name)
ntop.setHashCache(getHostAltNamesKey(), host_ip, alt_name)
end
-- Mac Addresses --