diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a8036abe51..c233408908 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-02-11 Sergio Martin + + * include/functions_network_components.php + godmode/modules/manage_network_components_form.php: Fix the default + interval when create network component. Fix the clone network components + fields to update all of them for bug 3595231 + 2013-02-11 Sergio Martin * include/functions_ui.php diff --git a/pandora_console/godmode/modules/manage_network_components_form.php b/pandora_console/godmode/modules/manage_network_components_form.php index 3ffe9e1973..90ce1d82d0 100644 --- a/pandora_console/godmode/modules/manage_network_components_form.php +++ b/pandora_console/godmode/modules/manage_network_components_form.php @@ -137,7 +137,7 @@ if (isset ($id)) { $oid = ""; $max = "0"; $min = "0"; - $module_interval = "0"; + $module_interval = "300"; $tcp_port = ""; $tcp_rcv = ""; $tcp_send = ""; diff --git a/pandora_console/include/functions_network_components.php b/pandora_console/include/functions_network_components.php index 7996f3083d..2a3cabefcd 100644 --- a/pandora_console/include/functions_network_components.php +++ b/pandora_console/include/functions_network_components.php @@ -399,38 +399,10 @@ function network_components_duplicate_network_component ($id_local_component) { return false; $name = __('Copy of').' '.$network['name']; + unset($network['id_nc']); + unset($network['name']); + unset($network['category_name']); - $networkCopy['description'] = $network['description']; - $networkCopy['max'] = $network['max']; - $networkCopy['min'] = $network['min']; - $networkCopy['module_interval'] = $network['module_interval']; - $networkCopy['tcp_port'] = $network['tcp_port']; - $networkCopy['tcp_send'] = $network['tcp_send']; - $networkCopy['tcp_rcv'] = $network['tcp_rcv']; - $networkCopy['snmp_community'] = $network['snmp_community']; - $networkCopy['snmp_oid'] = $network['snmp_oid']; - $networkCopy['id_module_group'] = $network['id_module_group']; - $networkCopy['id_modulo'] = $network['id_modulo']; - $networkCopy['id_plugin'] = $network['id_plugin']; - $networkCopy['plugin_user'] = $network['plugin_user']; - $networkCopy['plugin_pass'] = $network['plugin_pass']; - $networkCopy['plugin_parameter'] = $network['plugin_parameter']; - $networkCopy['max_timeout'] = $network['max_timeout']; - $networkCopy['max_retries'] = $network['max_retries']; - $networkCopy['history_data'] = $network['history_data']; - $networkCopy['min_warning'] = $network['min_warning']; - $networkCopy['max_warning'] = $network['max_warning']; - $networkCopy['str_warning'] = $network['str_warning']; - $networkCopy['min_critical'] = $network['min_critical']; - $networkCopy['max_critical'] = $network['max_critical']; - $networkCopy['str_critical'] = $network['str_critical']; - $networkCopy['min_ff_event'] = $network['min_ff_event']; - $networkCopy['critical_inverse'] = $network['critical_inverse']; - $networkCopy['warning_inverse'] = $network['warning_inverse']; - $networkCopy['critical_instructions'] = $network['critical_instructions']; - $networkCopy['warning_instructions'] = $network['warning_instructions']; - $networkCopy['unknown_instructions'] = $network['unknown_instructions']; - - return network_components_create_network_component ($name, $network['type'], $network['id_group'], $networkCopy); + return network_components_create_network_component ($name, $network['type'], $network['id_group'], $network); } ?>