diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index d22dd5dc1e..496a7b747f 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -55,7 +55,9 @@ function snmp_browser_print_tree( $last_array=[], $sufix=false, $checked=[], - $return=false + $return=false, + $descriptive_ids=false, + $previous_id='' ) { static $url = false; @@ -138,7 +140,13 @@ function snmp_browser_print_tree( } $checkbox_name_sufix = ($sufix === true) ? '_'.$level : ''; - $checkbox_name = 'create_'.$sub_id.$checkbox_name_sufix; + if ($descriptive_ids === true) { + $checkbox_name = 'create_'.$sub_id.$previous_id.$checkbox_name_sufix; + } else { + $checkbox_name = 'create_'.$sub_id.$checkbox_name_sufix; + } + + $previous_id = $checkbox_name_sufix; $status = (!empty($checked) && isset($checked[$level])); $output .= html_print_checkbox($checkbox_name, 0, $status, true, false, '').' '.$level.''; if (isset($sub_level['__VALUE__'])) { @@ -156,7 +164,9 @@ function snmp_browser_print_tree( $last_array, $sufix, $checked, - $return + $return, + $descriptive_ids, + $previous_id ); $count++; diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index cb4ee3dbad..76a8ac766c 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -205,13 +205,13 @@ sub data_consumer ($$) { $cnf_extra{'cred_file'} = $pa_config->{'temporal'} . '/tmp_discovery.' . md5($task->{'id_rt'} . $task->{'name'} . time()); eval { open(my $__file_cfg, '> '. $cnf_extra{'cred_file'}) or die($!); + print $__file_cfg $cnf_extra{'aws_access_key_id'} . "\n"; print $__file_cfg $cnf_extra{'aws_secret_access_key'} . "\n"; - print $__file_cfg $cnf_extra{'cloud_util_path'}; close($__file_cfg); set_file_permissions( $pa_config, $cnf_extra{'cred_file'}, - 0600 + "0600" ); }; if ($@) {