mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added support to multi_threshold template for every hook
This commit is contained in:
parent
6d2ee3d599
commit
7e6bdde2bd
3 changed files with 53 additions and 42 deletions
|
|
@ -39,12 +39,19 @@ end
|
|||
-- #######################################################
|
||||
|
||||
function multi_threshold_cross:describeConfig(hooks_conf)
|
||||
local configured_threshold = hooks_conf.all.script_conf
|
||||
local configured_threshold = {}
|
||||
for _, configuration in pairs(hooks_conf or {}) do
|
||||
if (configuration) and (table.len(configuration) > 0) then
|
||||
configured_threshold = configuration.script_conf
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
local msg = ''
|
||||
|
||||
for field, value in pairs(configured_threshold) do
|
||||
if(value.threshold ~= nil) then
|
||||
msg = msg .. i18n(field) .. ": " .. value.threshold .. "%, "
|
||||
msg = msg .. i18n(field) .. ": " .. value.threshold .. "%, "
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue