#11443 Fixed SNMP token checkbox wizard

This commit is contained in:
Jorge Rincon 2023-06-06 10:39:56 +02:00
parent 11a8bd688d
commit 5f44ae141a
1 changed files with 23 additions and 21 deletions

View File

@ -1645,13 +1645,13 @@ class AgentWizard extends HTML
} else if (preg_match('/module-critical-max/', $k) > 0) {
$result[$value]['criticalMax'] = $data[$k];
} else if (preg_match('/module-critical-inv/', $k) > 0) {
$result[$value]['criticalInv'] = $data[$k.'_sent'];
$result[$value]['criticalInv'] = $data[$k];
} else if (preg_match('/module-warning-inv/', $k) > 0) {
$result[$value]['warningInv'] = $data[$k.'_sent'];
$result[$value]['warningInv'] = $data[$k];
} else if (preg_match('/module-warning-perc/', $k) > 0) {
$result[$value]['warningPerc'] = $data[$k.'_sent'];
$result[$value]['warningPerc'] = $data[$k];
} else if (preg_match('/module-critical-perc/', $k) > 0) {
$result[$value]['criticalPerc'] = $data[$k.'_sent'];
$result[$value]['criticalPerc'] = $data[$k];
} else if (preg_match('/module-type/', $k) > 0) {
$result[$value]['moduleType'] = $data[$k];
} else if (preg_match('/module-unit/', $k) > 0) {
@ -4360,7 +4360,7 @@ class AgentWizard extends HTML
true,
false,
'change_control(this, \''.$uniqueId.'\')',
false,
true,
'form="form-create-modules"'
),
],
@ -4376,7 +4376,7 @@ class AgentWizard extends HTML
true,
false,
'change_control(this, \''.$uniqueId.'\')',
false,
true,
'form="form-create-modules"'
),
],
@ -4442,7 +4442,7 @@ class AgentWizard extends HTML
true,
false,
'change_control(this, \''.$uniqueId.'\')',
false,
true,
'form="form-create-modules"'
),
],
@ -4459,7 +4459,7 @@ class AgentWizard extends HTML
true,
false,
'change_control(this,\''.$uniqueId.'\')',
false,
true,
'form="form-create-modules"'
),
],
@ -6240,22 +6240,24 @@ class AgentWizard extends HTML
function change_control(checkbox, uniqueId) {
var checkbox_name = $(checkbox).attr('name');
if($(checkbox).prop('checked', true)) {
if(checkbox_name.match(/warning-inv/gm) !== null) {
$('#checkbox-module-warning-perc-'+uniqueId.replace('/','\\/')).prop('checked', false);
}
if(checkbox_name.match(/warning-inv/gm) !== null) {
$('#checkbox-module-warning-perc-'+uniqueId.replace('/','\\/')).prop('checked', false);
$('#checkbox-'+checkbox_name).val(1)
}
if(checkbox_name.match(/critical-inv/gm) !== null) {
$('#checkbox-module-critical-perc-'+uniqueId.replace('/','\\/')).prop('checked', false);
}
if(checkbox_name.match(/warning-perc/gm) !== null) {
$('#checkbox-module-warning-inv-'+uniqueId.replace('/','\\/')).prop('checked', false);
$('#checkbox-'+checkbox_name).val(1)
}
if(checkbox_name.match(/warning-perc/gm) !== null) {
$('#checkbox-module-warning-inv-'+uniqueId.replace('/','\\/')).prop('checked', false);
}
if(checkbox_name.match(/critical-inv/gm) !== null) {
$('#checkbox-module-critical-perc-'+uniqueId.replace('/','\\/')).prop('checked', false);
$('#checkbox-'+checkbox_name).val(1)
}
if(checkbox_name.match(/critical-perc/gm) !== null) {
$('#checkbox-module-critical-inv-'+uniqueId.replace('/','\\/')).prop('checked', false);
}
if(checkbox_name.match(/critical-perc/gm) !== null) {
$('#checkbox-module-critical-inv-'+uniqueId.replace('/','\\/')).prop('checked', false);
$('#checkbox-'+checkbox_name).val(1)
}
}