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:
GabrieleDeri 2024-09-04 15:40:32 +02:00 committed by GitHub
parent 4a613a8bbf
commit 658887a47e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 280 additions and 5 deletions

View 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)