Added fix for converting alerts_map with SQLite to a meaningful value

being it stored as BLOB
This commit is contained in:
Luca 2022-01-10 12:40:45 +01:00
parent 7bd1bc4185
commit bbcd1d011b
2 changed files with 8 additions and 7 deletions

View file

@ -39,12 +39,8 @@ interface.select(ifid)
-- Fetch the results
local alerts, recordsFiltered
if ntop.isClickHouseEnabled() then
alerts, recordsFiltered, info = flow_alert_store:select_request(nil, "*")
else
-- SQLite need conversion to HEX
alerts, recordsFiltered, info = flow_alert_store:select_request(nil, "*, hex(alerts_map) alerts_map")
end
alerts, recordsFiltered, info = flow_alert_store:select_request(nil, "*")
for _, _value in ipairs(alerts or {}) do
res[#res + 1] = flow_alert_store:format_record(_value, no_html)