Add the possibility to specify custom scripts parameters

This commit is contained in:
emanuele-f 2017-02-17 20:25:40 +01:00
parent 4a5f0cf8a3
commit a8d1f9e4e7
2 changed files with 35 additions and 0 deletions

View file

@ -804,6 +804,11 @@ local known_parameters = {
-- A special parameter is formed by a prefix, followed by a variable suffix
local special_parameters = { --[[Suffix validator]] --[[Value Validator]]
-- The following parameter is *not* used inside ntopng
-- It allows third-party users to write their own scripts with custom
-- (unverified) parameters
["p_"] = {validateUnchecked, validateUnchecked},
-- SHAPING
["shaper_"] = {validateNumber, validateNumber}, -- key: a shaper ID, value: max rate
["ishaper_"] = {validateShapedElement, validateNumber}, -- key: category or protocol ID, value: shaper ID