mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Updated network discovery to vuejs (#7368)
This commit is contained in:
parent
804a9a5c68
commit
95c585e2d0
11 changed files with 278 additions and 224 deletions
|
|
@ -7,16 +7,19 @@ 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)
|
||||
|
||||
sendHTTPHeader('application/json')
|
||||
local discover_info = discover.discover2table(ifname)
|
||||
|
||||
local res = {
|
||||
discovery_requested = discovery_requested,
|
||||
progress = discover.getDiscoveryProgress()
|
||||
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"]),
|
||||
}
|
||||
|
||||
print(json.encode(res, nil))
|
||||
rest_utils.answer(rest_utils.consts.success.ok, res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue