-- -- (C) 2013-15 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" -- host_info = url2hostinfo(_GET) if(host_ip == nil) then host_info = url2hostinfo(_GET) else -- print("host_ip:"..host_ip.."
") host_info = {} host_info = hostkey2hostinfo(host_ip) end if(mode == nil) then mode = _GET["mode"] end if(host_name == nil) then host_name = _GET["name"] end if(mode ~= "embed") then sendHTTPHeader('text/html; charset=iso-8859-1') ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc") active_page = "hosts" dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") end num_top_hosts = 10 if(host_info["host"] ~= nil) then num = 1 else interface.select(ifname) hosts_stats = interface.getHostsInfo() num = 0 for key, value in pairs(hosts_stats) do num = num + 1 end end if(num > 0) then if(mode ~= "embed") then if(host_info["host"] == nil) then print("

Top Hosts Interaction

") else name = host_name if(name == nil) then name = host_info["host"] end print("

"..name.." Interactions

Back") end end print [[

 

NOTE

    ]] if(host_info["host"] ~= nil) then print('
  1. This map is centered on host '.. hostinfo2hostkey(host_info)) if(host_name ~= nil) then print('('.. host_name .. ')') end print('. Clicking on this host you will visualize its details.
  2. \n') else print('
  3. This map depicts the interactions of the top '.. num_top_hosts .. ' hosts.
  4. \n') end print('
  5. Color map: local, remote, aggregation, focus host.
  6. \n') print [[
  7. Click is enabled only for hosts that have not been purged from memory.
]] else print("
No results found
") end if(mode ~= "embed") then dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua") end