New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add event limit for filter event definition #16035
Conversation
# Conflicts: # graylog2-server/src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessor.java # graylog2-server/src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessorConfig.java
# Conflicts: # graylog2-web-interface/src/components/event-definitions/event-definition-types/FilterAggregationForm.jsx
.../src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessorConfig.java
Outdated
Show resolved
Hide resolved
...og2-server/src/main/resources/org/graylog2/freemarker/templates/HTML/event_limit_reached.ftl
Outdated
Show resolved
Hide resolved
...erver/src/main/resources/org/graylog2/freemarker/templates/PLAINTEXT/event_limit_reached.ftl
Outdated
Show resolved
Hide resolved
.../src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessorConfig.java
Show resolved
Hide resolved
.../src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessorConfig.java
Show resolved
Hide resolved
# Conflicts: # graylog2-server/src/main/java/org/graylog2/notifications/Notification.java
…t on update, set default event limit to 100
graylog2-server/src/main/java/org/graylog/events/processor/EventDefinitionConfiguration.java
Show resolved
Hide resolved
...server/src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessor.java
Outdated
Show resolved
Hide resolved
...og2-server/src/main/resources/org/graylog2/freemarker/templates/HTML/event_limit_reached.ftl
Outdated
Show resolved
Hide resolved
...server/src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessor.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessorConfig.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessorConfig.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/graylog/events/processor/aggregation/AggregationEventProcessorConfig.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few comments, but it's almost over the finish line :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, as my comments have been addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works and LGTM 👍
With #16035 we try to enforce a new default event limit, without breaking backwards compatibility. The validations are making an exemption if an existing event definition is being edited which doesn't have an event limit yet (limit of 0) Duplicating event definitions was done in the frontend, and then creating a new one. This makes it impossible to differentiate between copy and create in the backend. - Create a new `/events/definitions/{definitionId}/duplicate` endpoint. Which creates a copy without performing a validation. - Also correctly set the state for unscheduled event defintions. This got missed with #15558 Refs #16035
* Allow duplicating event definitions with a limit of 0 With #16035 we try to enforce a new default event limit, without breaking backwards compatibility. The validations are making an exemption if an existing event definition is being edited which doesn't have an event limit yet (limit of 0) Duplicating event definitions was done in the frontend, and then creating a new one. This makes it impossible to differentiate between copy and create in the backend. - Create a new `/events/definitions/{definitionId}/duplicate` endpoint. Which creates a copy without performing a validation. - Also correctly set the state for unscheduled event defintions. This got missed with #15558 Refs #16035 * Add changelog * Move code to EventDefinitionHandler and add test
This PR introduces an event limit for the "Filter and Aggregation" event definition. However, only if the user selects "Filter has results".
How this feature behaves:
Description
Motivation and Context
Graylog2/graylog-plugin-enterprise#5382
Types of changes