mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added traffic direction and remove cli and srv location (#6665)
This commit is contained in:
parent
b5566ee3de
commit
2885659195
5 changed files with 36 additions and 19 deletions
|
|
@ -5379,6 +5379,28 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function format_query_direction(op, val)
|
||||
local historical_flow_utils = require "historical_flow_utils"
|
||||
local direction_where = ""
|
||||
if val == "0" then
|
||||
direction_where = "(" .. historical_flow_utils.get_flow_column_by_tag("cli_location") .. " " .. op .. " '0' AND " ..
|
||||
historical_flow_utils.get_flow_column_by_tag("srv_location") .. " " .. op .. " '0')"
|
||||
elseif val == "1" then
|
||||
direction_where = "(" .. historical_flow_utils.get_flow_column_by_tag("cli_location") .. " " .. op .. " '1' AND " ..
|
||||
historical_flow_utils.get_flow_column_by_tag("srv_location") .. " " .. op .. " '1')"
|
||||
elseif val == "2" then
|
||||
direction_where = "(" .. historical_flow_utils.get_flow_column_by_tag("cli_location") .. " " .. op .. " '0' AND " ..
|
||||
historical_flow_utils.get_flow_column_by_tag("srv_location") .. " " .. op .. " '1')"
|
||||
elseif val == "3" then
|
||||
direction_where = "(" .. historical_flow_utils.get_flow_column_by_tag("cli_location") .. " " .. op .. " '1' AND " ..
|
||||
historical_flow_utils.get_flow_column_by_tag("srv_location") .. " " .. op .. " '0')"
|
||||
end
|
||||
|
||||
return direction_where
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function format_confidence_from_json(record)
|
||||
local json = require "dkjson"
|
||||
local alert_json = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue