Fixed bug in module creation view

This commit is contained in:
manuel 2019-12-12 13:50:35 +01:00
parent ab1c6e17ca
commit 2504a3dc09
2 changed files with 8 additions and 3 deletions

View File

@ -466,11 +466,11 @@ $data[1] = html_print_select(
$array_os = [ $array_os = [
'inherited' => __('Inherited'), 'inherited' => __('Inherited'),
'linux' => __('Linux'), 'linux' => __('SSH'),
'windows' => __('Windows'), 'windows' => __('Windows remote'),
]; ];
$data[2] = __('Target OS'); $data[2] = __('Connection method');
$data[3] = html_print_select( $data[3] = html_print_select(
$array_os, $array_os,
'command_os', 'command_os',

View File

@ -7,6 +7,7 @@
var id_modules_icmp = Array(6, 7); var id_modules_icmp = Array(6, 7);
var id_modules_tcp = Array(8, 9, 10, 11); var id_modules_tcp = Array(8, 9, 10, 11);
var id_modules_snmp = Array(15, 16, 17, 18); var id_modules_snmp = Array(15, 16, 17, 18);
var id_modules_exec = Array(34, 35, 36, 37);
function configure_modules_form() { function configure_modules_form() {
$("#id_module_type").change(function() { $("#id_module_type").change(function() {
@ -23,6 +24,10 @@ function configure_modules_form() {
$("tr#simple-snmp_1, tr#simple-snmp_2").hide(); $("tr#simple-snmp_1, tr#simple-snmp_2").hide();
$("tr#simple-tcp_send, tr#simple-tcp_receive").show(); $("tr#simple-tcp_send, tr#simple-tcp_receive").show();
$("#text-tcp_port").removeAttr("disabled"); $("#text-tcp_port").removeAttr("disabled");
} else if (id_modules_exec.in_array(this.value)) {
$("tr#simple-tcp_send, tr#simple-tcp_receive").hide();
$("tr#simple-snmp_1, tr#simple-snmp_2").hide();
$("#text-tcp_port").attr("disabled", false);
} }
}); });