-- -- (C) 2013-17 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" require "graph_utils" sendHTTPHeader('text/html; charset=iso-8859-1') ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc") active_page = "flows" dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") application = _GET["application"] application_filter = "" hosts = _GET["hosts"] host = _GET["host"] vhost = _GET["vhost"] flowhosts_type = _GET["flowhosts_type"] flowhosts_type_filter = "" ipversion = _GET["version"] ipversion_filter = "" network_id = _GET["network"] prefs = ntop.getPrefs() interface.select(ifname) ifstats = interface.getStats() ndpistats = interface.getnDPIStats() local filter_base_url = ntop.getHttpPrefix() .. "/lua/flows_stats.lua" local filter_url_params = {} function getPageUrl(params, base_url) local base_url = base_url or filter_base_url local params = params or filter_url_params for _,_ in pairs(params) do return base_url .. "?" .. table.tconcat(params, "=", "&") end return base_url end if (network_id ~= nil) then network_name = ntop.getNetworkNameById(tonumber(network_id)) url = ntop.getHttpPrefix()..'/lua/flows_stats.lua?network='..network_id print [[ ]] end if (page == "flows" or page == nil) then print [[