Updated flow aggregation with new aggregation function

This commit is contained in:
Matteo Biscosi 2025-09-02 11:12:24 +02:00
parent 04afeefb5f
commit 307d10e81f
5 changed files with 90 additions and 136 deletions

View file

@ -279,7 +279,7 @@ end
-- @param max_nodes_per_level number, representing the maximum number of nodes per level
-- in case the number is surpassed, the "Other" node is added
-- @return a list composed by nodes and links
function flow_sankey.generateSankey(queries, max_nodes_per_level)
function flow_sankey.generateSankey(queries, max_nodes_per_level, isHistorical)
-- In case of multiple queries, run each query one by one,
-- then merge the data.
-- In case the rename_key_field and each queries search for different data,
@ -288,6 +288,10 @@ function flow_sankey.generateSankey(queries, max_nodes_per_level)
local nodes = {}
local links = {}
if not isHistorical then
interface.aggregateASNFlows()
end
for _, query in pairs(queries) do
local table_stats = flow_data.getStats({query})
local single_query_nodes = {}