Fixed problems with 'Discard unknown events' Ticket: #4242
(cherry picked from commit 07b92fd38a
)
This commit is contained in:
parent
2391e7ae78
commit
0763f09cc3
|
@ -1022,7 +1022,7 @@ if ($update_module || $create_module) {
|
||||||
|
|
||||||
$throw_unknown_events = (bool)get_parameter('throw_unknown_events', false);
|
$throw_unknown_events = (bool)get_parameter('throw_unknown_events', false);
|
||||||
//Set the event type that can show.
|
//Set the event type that can show.
|
||||||
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
|
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
|
||||||
$disabled_types_event = io_json_mb_encode($disabled_types_event);
|
$disabled_types_event = io_json_mb_encode($disabled_types_event);
|
||||||
|
|
||||||
$module_macro_names = (array) get_parameter('module_macro_names', array());
|
$module_macro_names = (array) get_parameter('module_macro_names', array());
|
||||||
|
|
|
@ -30,7 +30,7 @@ if (is_ajax ()) {
|
||||||
$component = db_get_row ('tnetwork_component', 'id_nc', $id_component);
|
$component = db_get_row ('tnetwork_component', 'id_nc', $id_component);
|
||||||
|
|
||||||
$component['throw_unknown_events'] =
|
$component['throw_unknown_events'] =
|
||||||
!network_components_is_disable_type_event($id_component, EVENTS_GOING_UNKNOWN);
|
network_components_is_disable_type_event($id_component, EVENTS_GOING_UNKNOWN);
|
||||||
|
|
||||||
// Decrypt passwords in the component.
|
// Decrypt passwords in the component.
|
||||||
$component['plugin_pass'] = io_output_password($component['plugin_pass']);
|
$component['plugin_pass'] = io_output_password($component['plugin_pass']);
|
||||||
|
|
|
@ -419,13 +419,13 @@ $table_advanced->colspan[4][1] = 2;
|
||||||
// Code comes from module_editor
|
// Code comes from module_editor
|
||||||
if ($__code_from == 'modules') {
|
if ($__code_from == 'modules') {
|
||||||
$throw_unknown_events_check =
|
$throw_unknown_events_check =
|
||||||
!modules_is_disable_type_event($id_agent_module, EVENTS_GOING_UNKNOWN);
|
modules_is_disable_type_event($id_agent_module, EVENTS_GOING_UNKNOWN);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
global $__id_pol_mod;
|
global $__id_pol_mod;
|
||||||
|
|
||||||
$throw_unknown_events_check =
|
$throw_unknown_events_check =
|
||||||
!policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN);
|
policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN);
|
||||||
}
|
}
|
||||||
$table_advanced->data[4][3] = __('Throw unknown events');
|
$table_advanced->data[4][3] = __('Throw unknown events');
|
||||||
$table_advanced->data[4][4] = html_print_checkbox('throw_unknown_events',
|
$table_advanced->data[4][4] = html_print_checkbox('throw_unknown_events',
|
||||||
|
|
|
@ -1110,7 +1110,7 @@ function process_manage_edit ($module_name, $agents_select = null) {
|
||||||
if ($throw_unknown_events !== '') {
|
if ($throw_unknown_events !== '') {
|
||||||
//Set the event type that can show.
|
//Set the event type that can show.
|
||||||
$disabled_types_event = array(
|
$disabled_types_event = array(
|
||||||
EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
|
EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
|
||||||
$values['disabled_types_event'] = json_encode($disabled_types_event);
|
$values['disabled_types_event'] = json_encode($disabled_types_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ $snmp3_security_level = (string) get_parameter('snmp3_security_level');
|
||||||
|
|
||||||
$throw_unknown_events = get_parameter('throw_unknown_events', false);
|
$throw_unknown_events = get_parameter('throw_unknown_events', false);
|
||||||
//Set the event type that can show.
|
//Set the event type that can show.
|
||||||
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
|
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
|
||||||
$disabled_types_event = json_encode($disabled_types_event);
|
$disabled_types_event = json_encode($disabled_types_event);
|
||||||
|
|
||||||
$create_component = (bool) get_parameter ('create_component');
|
$create_component = (bool) get_parameter ('create_component');
|
||||||
|
|
Loading…
Reference in New Issue