mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 08:50:12 +00:00
Implement additional plugin hook script.onUpdateConfig
Implements #4451
This commit is contained in:
parent
402e1113fb
commit
304c5404f2
4 changed files with 70 additions and 0 deletions
|
|
@ -78,6 +78,20 @@ end
|
|||
|
||||
-- #################################################################
|
||||
|
||||
-- @brief Called when the plugin containing the user script is loaded/reloaded
|
||||
-- or when the user script configuration changes (e.g., is on/off toggled or
|
||||
-- configuration parameters are changed).
|
||||
-- When the plugin is loaded/reloaded, this method is called with all the
|
||||
-- available existing configurations.
|
||||
-- @param confid An integer configuration id
|
||||
-- @param config A lua table with the configuration parameters for `confid`
|
||||
function script.onUpdateConfig(confid, config)
|
||||
print("on update:" .. script.key.. " confid: "..confid.."\n")
|
||||
tprint(config)
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
-- @brief Called when the user script is loaded
|
||||
-- @return true if the script should be loaded, false otherwise
|
||||
-- @notes Can be used to init some script global state or to skip the script
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue