mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Rework alertEntity functions to avoid modules circular dependencies
Fixes #2975
This commit is contained in:
parent
19f820f1bc
commit
10aa5542f8
30 changed files with 112 additions and 86 deletions
|
|
@ -16,6 +16,7 @@ sendHTTPHeader('application/json')
|
|||
local callback_utils = require("callback_utils")
|
||||
local recording_utils = require("recording_utils")
|
||||
local remote_assistance = require("remote_assistance")
|
||||
local alert_consts = require("alert_consts")
|
||||
|
||||
local function userHasRestrictions()
|
||||
local allowed_nets = ntop.getPref("ntopng.user." .. (_SESSION["user"] or "") .. ".allowed_nets")
|
||||
|
|
@ -88,7 +89,7 @@ function dumpInterfaceStats(ifid)
|
|||
res["has_alerts"] = ifstats["has_alerts"]
|
||||
res["ts_alerts"] = {}
|
||||
|
||||
if ts_utils.getDriverName() == "influxdb" and system_scripts.hasAlerts({entity = alertEntity("influx_db")}) then
|
||||
if ts_utils.getDriverName() == "influxdb" and system_scripts.hasAlerts({entity = alert_consts.alertEntity("influx_db")}) then
|
||||
res["ts_alerts"]["influxdb"] = true
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue