Fixed create network components

This commit is contained in:
Daniel Maya 2020-11-12 13:44:52 +01:00
parent 834b102ad2
commit 0ea8196db0
3 changed files with 3 additions and 3 deletions

View File

@ -170,7 +170,7 @@ if (is_ajax()) {
$id_target = explode(',', $id_items[0]);
}
if (empty($id_items[0])) {
if (empty($id_items[0]) && $module_target !== 'network_component') {
echo json_encode([0 => -1]);
exit;
}

View File

@ -616,7 +616,7 @@ function snmp_browser_print_oid(
$output .= html_print_table($table, true);
$url = 'index.php?'.'sec=gmodules&'.'sec2=godmode/modules/manage_network_components';
$output .= '<form id="snmp_create_module" style="text-align: center; margin: 10px" method="post" action="'.$url.'">';
$output .= '<form id="snmp_create_module" style="text-align: center; margin: 10px" target="_blank" method="post" action="'.$url.'">';
$output .= html_print_input_hidden('create_network_from_snmp_browser', 1, true);
$output .= html_print_input_hidden('id_component_type', 2, true);
$output .= html_print_input_hidden('type', 17, true);

View File

@ -541,7 +541,7 @@ function setOID() {
}
/**
* Create module on selected module_target (agent, networlk component or policy).
* Create module on selected module_target (agent, network component or policy).
*
* @param string module_target Target to create module.
* @param return_values Return snmp values.