From fdcdde6c78d6e1656c6ab4f57e107c4a42d17543 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Mon, 3 Apr 2023 15:35:46 +0200 Subject: [PATCH] 10550-Credential store clean snmp fields --- .../include/class/CredentialStore.class.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/class/CredentialStore.class.php b/pandora_console/include/class/CredentialStore.class.php index befc213a8c..904ddbc6e4 100644 --- a/pandora_console/include/class/CredentialStore.class.php +++ b/pandora_console/include/class/CredentialStore.class.php @@ -1294,6 +1294,7 @@ class CredentialStore extends Wizard $('#div-extra_1').append( $('') ); + hideSNMP(); } if ($('#product :selected').val() == "CUSTOM") { @@ -1303,6 +1304,7 @@ class CredentialStore extends Wizard $('#div-password').show(); $('#div-extra_1').hide(); $('#div-extra_2').hide(); + hideSNMP(); } else if ($('#product :selected').val() == "AWS") { $('#div-username label').text(''); $('#div-password label').text(''); @@ -1310,6 +1312,7 @@ class CredentialStore extends Wizard $('#div-password').show(); $('#div-extra_1').hide(); $('#div-extra_2').hide(); + hideSNMP(); } else if ($('#product :selected').val() == "AZURE") { $('#div-username label').text(''); $('#div-password label').text(''); @@ -1319,6 +1322,7 @@ class CredentialStore extends Wizard $('#div-password').show(); $('#div-extra_1').show(); $('#div-extra_2').show(); + hideSNMP(); } else if ($('#product :selected').val() == "SAP") { $('#div-username label').text(''); $('#div-password label').text(''); @@ -1326,6 +1330,7 @@ class CredentialStore extends Wizard $('#div-password').show(); $('#div-extra_1').hide(); $('#div-extra_2').hide(); + hideSNMP(); } else if ($('#product :selected').val() == "GOOGLE") { $('#div-username').hide(); $('#div-password').hide(); @@ -1341,6 +1346,7 @@ class CredentialStore extends Wizard $('') ); $('#div-extra_1').show(); + hideSNMP(); } else if ($('#product :selected').val() == "WMI") { $('#div-username label').text(''); $('#div-password label').text(''); @@ -1349,16 +1355,19 @@ class CredentialStore extends Wizard $('#div-password').show(); $('#div-extra_1').show(); $('#div-extra_2').hide(); + hideSNMP(); } else if ($('#product :selected').val() == "SNMP") { $('#div-username').hide(); $('#div-password').hide(); $('#div-extra_1').hide(); $('#div-extra_2').hide(); + $('#li_snmp_1').show(); + $('#li_snmp_2').show(); + if ($('#li_snmp_1').length > 0) { - console.log($('#li_snmp_1').length); - const test = ''; - console.log(test); + $('#version').val('1'); + $('#version').trigger('change'); } else { const ul = $('#modal_form').children('ul')[0];