Fix flow alerts with undefined pool/network. Cleanup code.

This commit is contained in:
Alfredo Cardigliano 2022-04-11 18:21:43 +02:00
parent 9f2724d91a
commit 98e077a7f8
5 changed files with 29 additions and 18 deletions

View file

@ -5,7 +5,7 @@
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
require "network_utils"
local network_utils = require "network_utils"
local json = require("dkjson")
sendHTTPContentTypeHeader('text/html')
@ -18,7 +18,7 @@ local n = interface.getNetworkStats(network)
local res = {}
for k, v in pairs(n) do
res = network2record(interface.getId(), v)
res = network_utils.network2record(interface.getId(), v)
break
end