mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
parent
5502f3fc2e
commit
b1499dc6db
3 changed files with 22 additions and 41 deletions
|
|
@ -726,33 +726,6 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function plugins_utils.checkReloadPlugins(when)
|
||||
local demo_ends_at = ntop.getInfo()["pro.demo_ends_at"]
|
||||
local time_delta = demo_ends_at - when
|
||||
local plugins_reloaded = false
|
||||
|
||||
-- tprint({time_delta = time_delta, demo_ends_at = demo_ends_at, when = when, is_pro = ntop.isPro()})
|
||||
|
||||
if ntop.getCache('ntopng.cache.force_reload_plugins') == '1' then
|
||||
-- Check and possibly reload plugins after a user has changed (e.g., applied or removed) a license
|
||||
-- from the web user interface (page about.lua)
|
||||
plugins_utils.loadPlugins(not ntop.isPro() --[[ reload only community if license is not pro --]])
|
||||
ntop.delCache('ntopng.cache.force_reload_plugins')
|
||||
plugins_reloaded = true
|
||||
elseif demo_ends_at and demo_ends_at > 0 and time_delta <= 10 and ntop.isPro() and not ntop.hasPluginsReloaded() then
|
||||
-- Checks and possibly reload plugins for demo licenses. In case of demo licenses,
|
||||
-- if within 10 seconds from the license expirations, a plugin reload is executed only for the community plugins
|
||||
plugins_utils.loadPlugins(true --[[ reload only community plugins --]])
|
||||
plugins_reloaded = true
|
||||
end
|
||||
|
||||
if plugins_reloaded then
|
||||
ntop.reloadPlugins()
|
||||
end
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function plugins_utils.getMenuEntries()
|
||||
init_runtime_paths()
|
||||
local menu = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue