-- -- (C) 2013-17 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" require "graph_utils" sendHTTPContentTypeHeader('text/html') 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 = "" traffic_type = _GET["traffic_type"] traffic_type_filter = "" flow_status = _GET["flow_status"] flow_status_filter = "" port = _GET["port"] network_id = _GET["network"] prefs = ntop.getPrefs() interface.select(ifname) ifstats = interface.getStats() ndpistats = interface.getnDPIStats() local base_url = ntop.getHttpPrefix() .. "/lua/flows_stats.lua" local page_params = {} 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 [[
]] if (page == "historical" and network_name ~= nil) then local netname_format = string.gsub(network_name, "_", "/") local rrd_file = _GET["rrd_file"] if (rrd_file == nil or rrd_file == "all") then rrd_file = "all" else rrd_file = getPathFromKey(netname_format).."/"..rrd_file end drawRRD(ifstats.id, nil, rrd_file, "1d", url.."&page=historical", 1, os.time() , "", nil) end dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")