-- -- (C) 2013-18 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local host_pools_utils = require "host_pools_utils" local ts_utils = require("ts_utils") local have_nedge = ntop.isnEdge() sendHTTPContentTypeHeader('text/html') ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc") local protocol = _GET["protocol"] local asn = _GET["asn"] local vlan = _GET["vlan"] local network = _GET["network"] local country = _GET["country"] local mac = _GET["mac"] local os_ = _GET["os"] local community = _GET["community"] local pool = _GET["pool"] local ipversion = _GET["version"] local traffic_type = _GET["traffic_type"] local base_url = ntop.getHttpPrefix() .. "/lua/hosts_stats.lua" local page_params = {} local mode = _GET["mode"] if isEmptyString(mode) then mode = "all" else page_params["mode"] = mode end local hosts_filter = '' if ((mode ~= "all") or (not isEmptyString(pool))) then hosts_filter = '' end local active_page = "hosts" dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") prefs = ntop.getPrefs() ifstats = interface.getStats() if (_GET["page"] ~= "historical") then if(asn ~= nil) then print [[