mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Added ASN Configuration page (#9271)
This commit is contained in:
parent
63e6427ab9
commit
b37f31c963
18 changed files with 522 additions and 3 deletions
31
scripts/lua/rest/v2/set/asn/config.lua
Normal file
31
scripts/lua/rest/v2/set/asn/config.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
--
|
||||
-- (C) 2021 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require "http_lint"
|
||||
local rest_utils = require "rest_utils"
|
||||
|
||||
local res = {}
|
||||
local customer_asn = _POST["customer_asn"]
|
||||
local sub_customer_asn = _POST["sub_customer_asn"]
|
||||
local remote_asn = _POST["remote_asn"]
|
||||
|
||||
if customer_asn then
|
||||
ntop.setCache("ntopng.prefs.config_customer_asn_list", customer_asn)
|
||||
end
|
||||
|
||||
if sub_customer_asn then
|
||||
ntop.setCache("ntopng.prefs.config_sub_customer_asn_list", sub_customer_asn)
|
||||
end
|
||||
|
||||
if remote_asn then
|
||||
ntop.setCache("ntopng.prefs.config_remote_asn_list", remote_asn)
|
||||
end
|
||||
|
||||
ntop.reloadASNConfiguration()
|
||||
|
||||
rest_utils.answer(rest_utils.consts.success.ok, res)
|
||||
Loading…
Add table
Add a link
Reference in a new issue