mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fixes alert_periodicity_changed failing to load graph_map_utils
This commit is contained in:
parent
0987014edb
commit
48be233fea
1 changed files with 7 additions and 3 deletions
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
-- ##############################################
|
||||
|
||||
|
||||
local flow_alert_keys = require "flow_alert_keys"
|
||||
-- Import the classes library.
|
||||
local classes = require "classes"
|
||||
|
|
@ -52,7 +51,6 @@ function alert_periodicity_changed.format(ifid, alert, alert_type_params)
|
|||
l7proto = ternary(tonumber(alert["l7_proto"]) ~= 0, alert["l7_proto"], alert["l7_master_proto"]),
|
||||
vlan_id = alert["vlan_id"]
|
||||
}
|
||||
local graph_map_utils = require("graph_map_utils")
|
||||
|
||||
if alert.json then
|
||||
info = json.decode(alert["json"])
|
||||
|
|
@ -63,7 +61,13 @@ function alert_periodicity_changed.format(ifid, alert, alert_type_params)
|
|||
end
|
||||
end
|
||||
|
||||
href = '<a href="' .. graph_map_utils.getMapUrl(flow_infos, interface.getId(), 'periodicity_map', 'graph') .. '"><i class="fas fa-lg fa-clock"></i></a>'
|
||||
if ntop.isEnterprise() and ntop.isAdministrator() then
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/pro/scripts/lua/enterprise/modules/?.lua;" .. package.path
|
||||
local graph_map_utils = require("graph_map_utils")
|
||||
|
||||
href = '<a href="' .. graph_map_utils.getMapUrl(flow_infos, interface.getId(), 'periodicity_map', 'graph') .. '"><i class="fas fa-lg fa-clock"></i></a>'
|
||||
end
|
||||
|
||||
if alert_type_params.is_periodic then
|
||||
return(i18n("alerts_dashboard.periodicity_is_periodic_descr", { info = info, href = href }))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue