Code cleanup and adjust. of naming conventions

This commit is contained in:
Simone Mainardi 2017-09-14 15:56:00 +02:00
parent 04406d5f1a
commit a8123ffe0a
7 changed files with 92 additions and 190 deletions

View file

@ -4,7 +4,7 @@
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
local discovery_enabled = (ntop.getPref("ntopng.prefs.is_device_discovery_enabled") == "1")
local discovery_enabled = (ntop.getPref("ntopng.prefs.is_network_discovery_enabled") == "1")
if discovery_enabled then
require "lua_utils"
@ -12,7 +12,7 @@ if discovery_enabled then
local callback_utils = require "callback_utils"
local now = os.time()
local discovery_interval = ntop.getPref("ntopng.prefs.device_discovery_interval")
local discovery_interval = ntop.getPref("ntopng.prefs.network_discovery_interval")
if isEmptyString(discovery_interval) then discovery_interval = 15 * 60 end
local diff = now % tonumber(discovery_interval)