mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Created network configuration page (#8692)
* Fixed remediation links not working * Added network configuration page * Removed commend and updated component name * Added network config page
This commit is contained in:
parent
4a613a8bbf
commit
658887a47e
8 changed files with 280 additions and 5 deletions
27
scripts/lua/rest/v2/get/network/config.lua
Normal file
27
scripts/lua/rest/v2/get/network/config.lua
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
--
|
||||
-- (C) 2021 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require "lua_utils"
|
||||
local rest_utils = require "rest_utils"
|
||||
local json = require "dkjson"
|
||||
|
||||
local ifid = tonumber(_GET["ifid"])
|
||||
|
||||
|
||||
local res = {}
|
||||
|
||||
-- Get data from redis: expected format, array of objects with keys:
|
||||
res = {{key= "unexpected_dhcp", value_description="192.168.2.85, 192.168.2.45" or "", is_enabled=true or false}}
|
||||
|
||||
|
||||
if isEmptyString(ifid) then
|
||||
rest_utils.answer(rest_utils.consts.err.invalid_interface)
|
||||
return
|
||||
end
|
||||
|
||||
rest_utils.answer(rest_utils.consts.success.ok, res)
|
||||
Loading…
Add table
Add a link
Reference in a new issue