-- -- (C) 2013-18 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" local discover = require "discover_utils" local ifId = getInterfaceId(ifname) local refresh_button = '' active_page = "dashboard" if _GET["request_discovery"] == "true" then refresh_button = "" discover.requestNetworkDiscovery(ifId) end local discovery_requested = discover.networkDiscoveryRequested(ifId) if discovery_requested then refresh_button = "" end local doa_fd = nil local doa = nil local enable_doa = false if(enable_doa) then local doa = require "doa" doa_fd = doa.init("/tmp/doa.update") end sendHTTPContentTypeHeader('text/html') ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc") dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") -- print('
| "..i18n("discover.network_discovery_datetime").." | "..formatEpoch(discovered["discovery_timestamp"]).." | |||||
|---|---|---|---|---|---|---|
| "..i18n("ip_address").." | "..i18n("name").." | "..i18n("mac_stats.manufacturer").." | "..i18n("mac_address").." | ") print(""..i18n("os").." | "..i18n("info").." | "..i18n("discover.device").." |
| ") print(""..tostring(el["ip"]).."") if el["icon"] then print(" "..el["icon"] .. " ") end if el["ghost"] then print(' '..discover.ghost_icon..'') end print(" | \n") -- Name print("") if el["sym"] then print(el["sym"]) end if el["symIP"] then if el["sym"] then print(" ["..el["symIP"].."]") else print(el["symIP"]) end end print(" | \n") -- Manufacturer print("") if el["manufacturer"] then print(el["manufacturer"]) else print(get_manufacturer_mac(el["mac"])) end if el["modelName"] then print(" ["..el["modelName"].."]") end print(" | \n") -- Mac print("") print(""..el["mac"].." ") print(" | \n") -- OS print("") local mac_info = interface.getMacInfo(el.mac) if(mac_info ~= nil) then el.operatingSystem = getOperatingSystemName(mac_info.operatingSystem) print(getOperatingSystemIcon(mac_info.operatingSystem)) else el.operatingSystem = nil print(" ") end print(" | \n") -- Information print("")
if el["information"] then print(table.concat(el["information"], " ")) end if el["url"] then if el["information"] then print(" "..el["url"]) else print(el["url"]) end end print(" | \n")
-- Device
print("") if el["device_label"] then print(el["device_label"]) end print(" | \n") print("