mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add safety check
This commit is contained in:
parent
df9a9fdba0
commit
f4e5625669
1 changed files with 2 additions and 1 deletions
|
|
@ -48,7 +48,8 @@ function alert_remote_access.format(ifid, alert, alert_type_params)
|
|||
if(alert.tstamp) then
|
||||
local now = os.time()
|
||||
local tstamp_end = alert["tstamp_end"] or now
|
||||
local time = tstamp_end - alert["tstamp"]
|
||||
local tstamp = alert["tstamp"] or tstamp_end
|
||||
local time = tstamp_end - tstamp
|
||||
|
||||
if time == 0 then
|
||||
time = "< 1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue