mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Add REST API to get DB columns and info (#7035)
This commit is contained in:
parent
8dd45d1204
commit
d816fa7a93
2 changed files with 47 additions and 1 deletions
|
|
@ -2070,5 +2070,26 @@ function historical_flow_utils.getSimpleColumnFormatter(label, data)
|
|||
return data
|
||||
end
|
||||
|
||||
-- #####################################
|
||||
|
||||
-- Return the list of available DB columns and
|
||||
-- relative tags used to filter info
|
||||
function historical_flow_utils.getAvailableColumns()
|
||||
if not interfaceHasClickHouseSupport() then
|
||||
return {}
|
||||
end
|
||||
local extended_flow_columns = historical_flow_utils.get_extended_flow_columns()
|
||||
local data = {}
|
||||
|
||||
for column_name, column_options in pairs(extended_flow_columns) do
|
||||
data[#data + 1] = {
|
||||
column_name = column_name,
|
||||
tag = column_options["tag"]
|
||||
}
|
||||
end
|
||||
|
||||
return data
|
||||
end
|
||||
|
||||
return historical_flow_utils
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue