-- -- (C) 2013-18 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path if((dirs.scriptdir ~= nil) and (dirs.scriptdir ~= "")) then package.path = dirs.scriptdir .. "/lua/modules/?.lua;" .. package.path end require "lua_utils" local alerts_api = require("alerts_api") local recording_utils = require "recording_utils" local remote_assistance = require "remote_assistance" local telemetry_utils = require "telemetry_utils" local ts_utils = require("ts_utils_core") local is_admin = isAdministrator() print[[ ]] if ntop.isnEdge() then dofile(dirs.installdir .. "/pro/scripts/lua/nedge/inc/menu.lua") return end local template = require "template_utils" prefs = ntop.getPrefs() local iface_names = interface.getIfNames() -- tprint(iface_names) num_ifaces = 0 for k,v in pairs(iface_names) do num_ifaces = num_ifaces+1 end print [[
\n

") addLogoSvg() print("

\n
\n") -- select the original interface back to prevent possible issues interface.select(ifname) if(dirs.workingdir == "/var/tmp/ntopng") then print('
') end local lbd_serialize_by_mac = (_POST["lbd_hosts_as_macs"] == "1") or (ntop.getPref(string.format("ntopng.prefs.ifid_%u.serialize_local_broadcast_hosts_as_macs", ifs.id)) == "1") if(ifs.has_seen_dhcp_addresses and is_admin and (not is_pcap_dump) and is_packet_interface) then if(not lbd_serialize_by_mac) then if(ntop.getPref(string.format("ntopng.prefs.ifid_%u.disable_host_identifier_message", ifs.id)) ~= "1") then print('
') end elseif isEmptyString(_POST["dhcp_ranges"]) then local dhcp_utils = require("dhcp_utils") local ranges = dhcp_utils.listRanges(ifs.id) if(table.empty(ranges)) then print('
') end end end if ts_utils.getDriverName() == "influxdb" then local msg = ntop.getCache("ntopng.cache.influxdb.last_error") if not isEmptyString(msg) then print('
') end end -- Hidden by default, will be shown by the footer if necessary print('
') if(_SESSION["INVALID_CSRF"]) then print('
') end telemetry_utils.show_notice()