mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
25 lines
811 B
Lua
25 lines
811 B
Lua
--
|
|
-- (C) 2013-24 - ntop.org
|
|
--
|
|
|
|
local dirs = ntop.getDirs()
|
|
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|
require "lua_utils"
|
|
local json = require("dkjson")
|
|
local discover = require "discover_utils"
|
|
local rest_utils = require "rest_utils"
|
|
|
|
local ifId = _GET["ifid"]
|
|
|
|
local discovery_requested = discover.networkDiscoveryRequested(ifId)
|
|
local discover_info = discover.discover2table(ifname)
|
|
|
|
local res = {
|
|
discovery_requested = discovery_requested,
|
|
progress = discover.getDiscoveryProgress(),
|
|
ghost_found = true,
|
|
too_many_devices = discover_info["too_many_devices_discovered"],
|
|
last_network_discovery = i18n("discover.network_discovery_datetime")..": "..formatEpoch(discover_info["discovery_timestamp"]),
|
|
}
|
|
|
|
rest_utils.answer(rest_utils.consts.success.ok, res)
|