mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Improve alert time format
This commit is contained in:
parent
19052bcd62
commit
46b950b521
2 changed files with 9 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ require "lua_utils"
|
|||
require "alert_utils"
|
||||
require "flow_utils"
|
||||
|
||||
local format_utils = require "format_utils"
|
||||
local json = require "dkjson"
|
||||
|
||||
sendHTTPContentTypeHeader('text/html')
|
||||
|
|
@ -88,8 +89,10 @@ for _key,_value in ipairs(alerts) do
|
|||
alert_entity_val = ""
|
||||
end
|
||||
|
||||
if(tdiff < 60) then
|
||||
column_date = secondsToTime(tdiff).." ago"
|
||||
if(tdiff <= 600) then
|
||||
column_date = secondsToTime(tdiff).. " " ..i18n("details.ago")
|
||||
else
|
||||
column_date = format_utils.formatPastEpochShort(_value["alert_tstamp"])
|
||||
end
|
||||
|
||||
if engaged == true then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue