Merge branch 'ent-11443-errores-en-la-configuracion-de-intervalo-inverso-y-en-los-wizard-snmp' into 'develop'

Ent 11443 errores en la configuracion de intervalo inverso y en los wizard snmp

See merge request artica/pandorafms!6039
This commit is contained in:
Matias Didier 2023-07-06 08:52:17 +00:00
commit 859fe48b14
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)
}
}