mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
Implements additional plugin hooks
The following plugin hooks have been implemented onEnable(hook, hook_config) onDisable(hook, hook_config) onUpdateConfig(hook, hook_config) onLoad(hook, hook_config) onUnload(hook, hook_config) Documentation is part of the commit. Implements #4451 Implements #4453 Implements #4454 Implements #4455
This commit is contained in:
parent
f83ccb70d5
commit
3ad4522e45
5 changed files with 146 additions and 40 deletions
|
|
@ -83,9 +83,41 @@ local script = {
|
|||
-- #################################################################
|
||||
|
||||
-- @brief See host/example.lua
|
||||
function script.onUpdateConfig(confid, config)
|
||||
print("on update:" .. script.key.. " confid: "..confid.."\n")
|
||||
tprint(config)
|
||||
function script.onLoad(hook, hook_config)
|
||||
tprint("loading: "..hook)
|
||||
-- tprint(hook_config)
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
-- @brief See host/example.lua
|
||||
function script.onUnload(hook, hook_config)
|
||||
tprint("unloading: "..hook)
|
||||
-- tprint(hook_config)
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
-- @brief See host/example.lua
|
||||
function script.onEnable(hook, hook_config)
|
||||
tprint("[+] enabling: "..hook)
|
||||
-- tprint(hook_config)
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
-- @brief See host/example.lua
|
||||
function script.onDisable(hook, hook_config)
|
||||
tprint("[-] disabling: "..hook)
|
||||
-- tprint(hook_config)
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
-- @brief See host/example.lua
|
||||
function script.onUpdateConfig(hook, hook_config)
|
||||
tprint("[~] config change: "..hook)
|
||||
-- tprint(hook_config)
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue