diff --git a/pandora_console/include/lib/Dashboard/Widgets/events_list.php b/pandora_console/include/lib/Dashboard/Widgets/events_list.php index ee0ac5afc0..a50cab93e4 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/events_list.php +++ b/pandora_console/include/lib/Dashboard/Widgets/events_list.php @@ -246,6 +246,10 @@ class EventsListWidget extends Widget $values['groupRecursion'] = $decoder['groupRecursion']; } + if (isset($decoder['secondaryGroup']) === true) { + $values['secondaryGroup'] = $decoder['secondaryGroup']; + } + if (isset($decoder['customFilter']) === true) { $values['customFilter'] = $decoder['customFilter']; } @@ -456,6 +460,18 @@ class EventsListWidget extends Widget ], ]; + // Secondary group. + $inputs['inputs']['row2'][] = [ + 'label' => \__('Secondary group'), + 'arguments' => [ + 'type' => 'switch', + 'name' => 'secondaryGroup', + 'class' => 'event-widget-input', + 'value' => $values['secondaryGroup'], + 'return' => true, + ], + ]; + // Group recursion. $inputs['inputs']['row2'][] = [ 'label' => \__('Group recursion'), @@ -537,6 +553,7 @@ class EventsListWidget extends Widget $values['groupId'] = \get_parameter_switch('groupId', []); $values['tagsId'] = \get_parameter_switch('tagsId', []); $values['groupRecursion'] = \get_parameter_switch('groupRecursion', 0); + $values['secondaryGroup'] = \get_parameter('secondaryGroup', 0); $values['customFilter'] = \get_parameter('customFilter', -1); $values['columns_events_widget'] = \get_parameter('columns_events_widget', []); @@ -721,6 +738,7 @@ class EventsListWidget extends Widget $this->values['limit'] = $config['block_size']; } + $filter['search_secondary_groups'] = $this->values['secondaryGroup']; // Print datatable. $output .= ui_print_datatable( [