mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 02:16:39 +00:00
Handle operators in (view only) tags
This commit is contained in:
parent
f242b94b6d
commit
ee7c012926
6 changed files with 33 additions and 27 deletions
|
|
@ -14,6 +14,7 @@ local alert_consts = require "alert_consts"
|
|||
local alert_utils = require "alert_utils"
|
||||
local alert_severities = require "alert_severities"
|
||||
local alert_roles = require "alert_roles"
|
||||
local tag_utils = require "tag_utils"
|
||||
|
||||
-- ##############################################
|
||||
|
||||
|
|
@ -89,12 +90,10 @@ function alert_store:strip_filter_operator(value)
|
|||
local filter = split(value, ",")
|
||||
local value = filter[1]
|
||||
local op = filter[2]
|
||||
if op == 'lt' then
|
||||
op = '<='
|
||||
elseif op == 'gt' then
|
||||
op = '>='
|
||||
if tag_utils.tag_operators[op] then
|
||||
op = tag_utils.tag_operators[op]
|
||||
else
|
||||
op = '='
|
||||
op = tag_utils.tag_operators['eq']
|
||||
end
|
||||
return value, op
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue