Skip to content
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

Prevent bulk replaying system events. #21435

Merged
merged 5 commits into from
Jan 28, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleaning up test.
dennisoelkers committed Jan 24, 2025
commit 4d776544e0b252a3a5eba1d0028cbbc7488d8332
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import { simpleEventDefinition as mockEventDefinition } from 'fixtures/eventDefi
import useScopePermissions from 'hooks/useScopePermissions';
import useCurrentUser from 'hooks/useCurrentUser';
import useEventDefinitionConfigFromLocalStorage from 'components/event-definitions/hooks/useEventDefinitionConfigFromLocalStorage';
import { SYSTEM_EVENT_DEFINITION_TYPE } from 'components/event-definitions/constants';
import { SYSTEM_EVENT_DEFINITION_TYPE as mockSYSTEM_EVENT_DEFINITION_TYPE } from 'components/event-definitions/constants';

import EventDefinitionFormContainer from './EventDefinitionFormContainer';

@@ -75,7 +75,7 @@ jest.mock('stores/connect', () => ({
stores: { [key: string]: any },
_mapProps: (args: { [key: string]: any }) => any,
) => {
const storeProps = Object.entries(stores).reduce((acc, [key, store]) => ({ ...acc, [key]: store.getInitialState() }), {});
const storeProps = Object.fromEntries(Object.entries(stores).map(([key, store]) => [key, store.getInitialState()]));
const componentProps = {
...storeProps,
eventDefinition: {
@@ -98,7 +98,7 @@ jest.mock('stores/event-definitions/AvailableEventDefinitionTypesStore', () => (
getInitialState: () => ({
aggregation_functions: ['avg', 'card', 'count', 'max', 'min', 'sum', 'stddev', 'sumofsquares', 'variance', 'percentage', 'percentile', 'latest'],
field_provider_types: ['template-v1', 'lookup-v1'],
processor_types: ['aggregation-v1', SYSTEM_EVENT_DEFINITION_TYPE, 'correlation-v1', 'anomaly-v1', 'sigma-v1'],
processor_types: ['aggregation-v1', mockSYSTEM_EVENT_DEFINITION_TYPE, 'correlation-v1', 'anomaly-v1', 'sigma-v1'],
storage_handler_types: ['persist-to-streams-v1'],
}),
},