mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Removed duration (e.g. '< 1 sec') for alerts with no duration
This commit is contained in:
parent
724f1da5ea
commit
5d3cdc490c
1 changed files with 3 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ for _key,_value in ipairs(alerts) do
|
|||
local record = {}
|
||||
local alert_entity
|
||||
local alert_entity_val
|
||||
local column_duration = "-"
|
||||
local column_duration = ""
|
||||
local tdiff = os.time()-_value["alert_tstamp"]
|
||||
local column_date = os.date("%c", _value["alert_tstamp"])
|
||||
|
||||
|
|
@ -105,7 +105,8 @@ for _key,_value in ipairs(alerts) do
|
|||
|
||||
if engaged == true then
|
||||
column_duration = secondsToTime(os.time() - tonumber(_value["alert_tstamp"]))
|
||||
elseif tonumber(_value["alert_tstamp_end"]) ~= nil then
|
||||
elseif tonumber(_value["alert_tstamp_end"]) ~= nil
|
||||
and (tonumber(_value["alert_tstamp_end"]) - tonumber(_value["alert_tstamp"])) ~= 0 then
|
||||
column_duration = secondsToTime(tonumber(_value["alert_tstamp_end"]) - tonumber(_value["alert_tstamp"]))
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue