#9107 Fixed filter event

This commit is contained in:
Daniel Maya 2022-07-15 11:38:46 +02:00
parent 99bfdc804e
commit 987678b339
3 changed files with 10 additions and 10 deletions

View File

@ -771,7 +771,7 @@ if ($save_filter_modal) {
$data[1] .= html_print_select(
$user_groups_array,
'id_group_filter',
'id_group_filter_dialog',
$id_group_filter,
'',
'',
@ -878,7 +878,7 @@ function save_new_filter() {
"page" : "include/ajax/events",
"save_event_filter" : 1,
"id_name" : $("#text-id_name").val(),
"id_group" : $("select#id_group").val(),
"id_group" : $("#id_group_filter").val(),
"event_type" : $("#event_type").val(),
"severity" : $("#severity").val(),
"status" : $("#status").val(),
@ -893,7 +893,7 @@ function save_new_filter() {
"tag_with": Base64.decode($("#hidden-tag_with").val()),
"tag_without": Base64.decode($("#hidden-tag_without").val()),
"filter_only_alert" : $("#filter_only_alert").val(),
"id_group_filter": $("#id_group_filter").val(),
"id_group_filter": $("#id_group_filter_dialog").val(),
"date_from": $("#text-date_from").val(),
"time_from": $("#text-time_from").val(),
"date_to": $("#text-date_to").val(),
@ -953,7 +953,7 @@ function save_update_filter() {
{"page" : "include/ajax/events",
"update_event_filter" : 1,
"id" : $("#overwrite_filter").val(),
"id_group" : $("select#id_group").val(),
"id_group" : $("#id_group_filter").val(),
"event_type" : $("#event_type").val(),
"severity" : $("#severity").val(),
"status" : $("#status").val(),
@ -968,7 +968,7 @@ function save_update_filter() {
"tag_with" : Base64.decode($("#hidden-tag_with").val()),
"tag_without" : Base64.decode($("#hidden-tag_without").val()),
"filter_only_alert" : $("#filter_only_alert").val(),
"id_group_filter": $("#id_group_filter").val(),
"id_group_filter": $("#id_group_filter_dialog").val(),
"date_from": $("#text-date_from").val(),
"time_from": $("#text-time_from").val(),
"date_to": $("#text-date_to").val(),

View File

@ -171,7 +171,7 @@ $filter_only_alert = get_parameter(
);
$id_group_filter = get_parameter(
'filter[id_group_filter]',
($filter['id_group_filter'] ?? '')
($filter['id_group'] ?? '')
);
$date_from = get_parameter(
'filter[date_from]',
@ -1551,8 +1551,8 @@ if (enterprise_hook(
*/
// Group.
if ($id_group_filter === null) {
$id_group_filter = 0;
if ($id_group === null) {
$id_group = 0;
}
$data = html_print_input(
@ -1561,7 +1561,7 @@ $data = html_print_input(
'returnAllGroup' => true,
'privilege' => 'AR',
'type' => 'select_groups',
'selected' => $id_group_filter,
'selected' => $id_group,
'nothing' => false,
'return' => true,
'size' => '80%',

View File

@ -446,7 +446,7 @@ if (isset($double_authentication)) {
if (check_acl($config['id_user'], 0, 'ER')) {
$event_filter = '<div class="label_select"><p class="edit_user_labels">'.__('Event filter').'</p>';
$user_groups = implode(',', array_keys((users_get_groups($config['id_user'], 'AR', $display_all_group))));
$user_groups = implode(',', array_keys((users_get_groups($config['id_user'], 'AR', true))));
$event_filter .= html_print_select_from_sql(
'SELECT id_filter, id_name FROM tevent_filter WHERE id_group_filter IN ('.$user_groups.')',
'event_filter',