-- -- (C) 2013-18 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path -- io.write ("Session:".._SESSION["session"].."\n") require "lua_utils" local page_utils = require("page_utils") sendHTTPContentTypeHeader('text/html') interface.select(ifname) page_utils.print_header() local host_info = url2hostinfo(_GET) local host_ip = nil if host_info then host_ip = host_info["host"] end --active_page = "home" dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") local ifstats = interface.getStats() local is_loopback = isLoopback(ifname) local iface_id = interface.name2id(ifname) -- Load from or set in redis the refresh frequency for the top talkers heatmap local refresh = _GET["refresh"] local refresh_key = 'ntopng.prefs.'.._SESSION["user"]..'.'..ifname..'.heatmap_refresh' if (refresh ~= nil) then ntop.setCache(refresh_key,refresh) else refresh = ntop.getCache(refresh_key) end -- Default frequency (ms) if (refresh == '') then refresh = 5000 end if((ifstats ~= nil) and (ifstats.stats.packets > 0)) then -- Print tabbed header print [[
 ]] print(i18n("index_page.refresh_frequency")) print[[:
]] if (refresh ~= '0') then print [[  ]] print(i18n("index_page.live_update")) print[[:
]] else print [[  ]] print(i18n("index_page.refresh")) print[[:
]] end print [[
]] print[[ ]] end dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")