mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Add nil checks
This commit is contained in:
parent
e82c66fb7c
commit
eebf8674ac
2 changed files with 11 additions and 5 deletions
|
|
@ -157,11 +157,13 @@ function alerts_api.checkPendingStoreAlerts(deadline)
|
|||
|
||||
local alert = json.decode(alert_json)
|
||||
|
||||
interface.storeAlert(
|
||||
alert.alert_tstamp, alert.alert_tstamp_end, alert.alert_granularity,
|
||||
alert.alert_type, alert.alert_subtype, alert.alert_severity,
|
||||
alert.alert_entity, alert.alert_entity_val,
|
||||
alert.alert_json)
|
||||
if(alert) then
|
||||
interface.storeAlert(
|
||||
alert.alert_tstamp, alert.alert_tstamp_end, alert.alert_granularity,
|
||||
alert.alert_type, alert.alert_subtype, alert.alert_severity,
|
||||
alert.alert_entity, alert.alert_entity_val,
|
||||
alert.alert_json)
|
||||
end
|
||||
|
||||
if(os.time() > deadline) then
|
||||
return(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue