Added the AS icon to the as-stats page (#9630)

This commit is contained in:
Manuel Ceroni 2025-09-08 09:24:57 +02:00 committed by GitHub
parent e6f3f4aae4
commit d6155c0974
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 38 additions and 0 deletions

View file

@ -94,4 +94,18 @@ table.sort(res, function(a, b)
return a.asn < b.asn
end)
local customer_asn, sub_customer_asn, remote_asn = as_utils.getAllConfigurations()
for pos, value in pairs(res or {}) do
if value.asn ~= nil and value.asname ~= nil then
local as = tostring(value.asn)
if customer_asn[as] then
value.is_customer_asn = true
elseif sub_customer_asn[as] then
value.is_sub_customer_asn = true
elseif remote_asn[as] then
value.is_remote_asn = true
end
end
end
rest_utils.answer(rest_utils.consts.success.ok, res)