mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
27 lines
692 B
Lua
27 lines
692 B
Lua
--
|
|
-- (C) 2021 - ntop.org
|
|
--
|
|
local dirs = ntop.getDirs()
|
|
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|
|
|
local rest_utils = require "rest_utils"
|
|
local json = require "dkjson"
|
|
local as_utils = require "as_utils"
|
|
|
|
local res = {}
|
|
|
|
-- Get data from redis: expected format, array of objects with keys:
|
|
res = {
|
|
{
|
|
key = "customer_asn",
|
|
value_description = as_utils.getCustomerASNList()
|
|
}, {
|
|
key = "sub_customer_asn",
|
|
value_description = as_utils.getSubCustomerASNList()
|
|
}, {
|
|
key = "remote_asn",
|
|
value_description = as_utils.getRemoteASNList()
|
|
}
|
|
}
|
|
|
|
rest_utils.answer(rest_utils.consts.success.ok, res)
|