Use check_module key instead of script name

This commit is contained in:
emanuele-f 2019-08-08 18:03:16 +02:00
parent 899b580cc4
commit ee3a5e7413
2 changed files with 5 additions and 3 deletions

View file

@ -1075,7 +1075,8 @@ function drawAlertSourceSettings(entity_type, alert_source, delete_button_msg, d
end
-- TODO refactor this into the threshold cross checker
for k, check_module in pairs(descr) do
for _, check_module in pairs(descr) do
k = check_module.key
value = _POST["value_"..k]
operator = _POST["op_"..k] or ""
@ -1201,7 +1202,8 @@ function drawAlertSourceSettings(entity_type, alert_source, delete_button_msg, d
print[[</th></tr>]]
print('<input id="csrf" name="csrf" type="hidden" value="'..ntop.getRandomCSRFValue()..'" />\n')
for key, check_module in pairsByKeys(descr, asc) do
for _, check_module in pairsByKeys(descr, asc) do
local key = check_module.key
local gui_conf = check_module.gui
local show_input = true