-- -- (C) 2013-15 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" if(host_ip == nil) then host_ip = _GET["host"] 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_ip ~= 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_ip == nil) then print("

Top System Hosts Interaction

") else name = host_name if(name == nil) then name = host_ip end print("

"..name.." Interactions

Back") end end print [[
]] else print("
No results found
") end if(mode ~= "embed") then dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua") end