From cd430f9f3fc60a3d2aff00af981de1f1ce6e8403 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Mon, 28 Aug 2023 12:27:45 +0200 Subject: [PATCH 1/2] 11952-Fix filters in List of latest events --- .../lib/Dashboard/Widgets/events_list.php | 17 +++++++++-------- pandora_console/operation/events/events.php | 5 +++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/lib/Dashboard/Widgets/events_list.php b/pandora_console/include/lib/Dashboard/Widgets/events_list.php index ad9725825d..9fcdb8b3ce 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/events_list.php +++ b/pandora_console/include/lib/Dashboard/Widgets/events_list.php @@ -720,14 +720,15 @@ class EventsListWidget extends Widget 'style' => 'width: 99%;', 'ajax_url' => 'operation/events/events', 'ajax_data' => [ - 'get_events' => 1, - 'table_id' => $table_id, - 'filter' => $filter, - 'length' => $this->values['limit'], - 'groupRecursion' => (bool) $this->values['groupRecursion'], - 'auth_hash' => $hash, - 'auth_class' => 'PandoraFMS\Dashboard\Manager', - 'id_user' => $id_user, + 'get_events' => 1, + 'table_id' => $table_id, + 'filter' => $filter, + 'event_list_widget_filter' => $filter, + 'length' => $this->values['limit'], + 'groupRecursion' => (bool) $this->values['groupRecursion'], + 'auth_hash' => $hash, + 'auth_class' => 'PandoraFMS\Dashboard\Manager', + 'id_user' => $id_user, ], 'default_pagination' => $this->values['limit'], 'pagination_options' => [ diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 0152fea782..72ffd8e760 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -104,6 +104,11 @@ if (isset($fb64) === true) { ); } +$event_list_widget_filter = get_parameter('event_list_widget_filter', null); +if (isset($event_list_widget_filter) === true) { + $filter = $event_list_widget_filter; +} + $settings_modal = get_parameter('settings', 0); $parameters_modal = get_parameter('parameters', 0); From c61d6051b4b1fd5c617e3964c902c8b7714a4724 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Tue, 29 Aug 2023 12:43:33 +0200 Subject: [PATCH 2/2] 11952-Add event status in List of latest events --- pandora_console/include/lib/Dashboard/Widgets/events_list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora_console/include/lib/Dashboard/Widgets/events_list.php b/pandora_console/include/lib/Dashboard/Widgets/events_list.php index 9fcdb8b3ce..b7ad581dc0 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/events_list.php +++ b/pandora_console/include/lib/Dashboard/Widgets/events_list.php @@ -394,6 +394,8 @@ class EventsListWidget extends Widget -1 => \__('All event'), 1 => \__('Only validated'), 0 => \__('Only pending'), + 2 => \__('Only in process'), + 3 => \__('Only not validated'), ]; $inputs['inputs']['row1'][] = [