mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Fix sql op and add comment. (#6922)
This commit is contained in:
parent
fc135e1661
commit
d4c67d4efc
1 changed files with 5 additions and 1 deletions
|
|
@ -258,11 +258,15 @@ function alert_store:build_sql_cond(cond, is_write)
|
|||
elseif cond.field == 'alert_id' and tonumber(cond.value) ~= 0 then
|
||||
local alert_id_bit = "bitShiftLeft(toUInt128('1'), "..cond.value..")"
|
||||
sql_cond = string.format(" (%s %s %u %s (%s %s %s) ) ",
|
||||
--[[
|
||||
filter with the predominant alert_id and also search
|
||||
the alert_id in the alerts_map where the other flow alerts are present.
|
||||
--]]
|
||||
self:get_column_name('alert_id', is_write),
|
||||
sql_op, cond.value,
|
||||
'OR',
|
||||
"bitAnd("..alert_id_bit..",reinterpretAsUInt128(reverse(unhex(alerts_map))) )",
|
||||
"=",
|
||||
sql_op,
|
||||
alert_id_bit)
|
||||
|
||||
-- Special case: ip (with vlan)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue