feat(14351): New sigma summary and condition form#26210
Merged
kingzacko1 merged 5 commits intoJun 7, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds UI support for Sigma-based event definitions so they can be viewed/managed from the standard Event Definitions pages, aligning Sigma event definitions with existing event definition UX patterns.
Changes:
- Refactors
ViewEventDefinitionPageto load event definitions via a React Query hook and to gate Sigma edit actions by scope permissions. - Updates
EventConditionFormto keep the current condition type selectable even if excluded from the normal condition-type list, and adjusts help panel layout behavior. - Enables editing/deleting Sigma event definitions from the Event Definitions list actions and updates the page tests accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| graylog2-web-interface/src/pages/ViewEventDefinitionPage.tsx | Switches event definition loading to React Query hook and updates action visibility logic (notably for Sigma). |
| graylog2-web-interface/src/pages/ViewEventDefinitionPage.test.tsx | Updates mocks/assertions to match the new React Query + scope-permissions based implementation. |
| graylog2-web-interface/src/components/event-definitions/event-definitions/EventDefinitionActions.tsx | Removes Sigma-specific delete restriction and gates Sigma edit action visibility via scope permissions. |
| graylog2-web-interface/src/components/event-definitions/event-definition-form/EventConditionForm.tsx | Ensures current condition type remains present in the dropdown and decouples help panel rendering from the form component. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
46
to
+65
| @@ -60,35 +60,32 @@ const ViewEventDefinitionPage = () => { | |||
| ? (pluggableSigmaModal.component as React.FC<{ ruleId: string; onCancel: () => void; onConfirm: () => void }>) | |||
| : null; | |||
|
|
|||
| useEffect(() => { | |||
| if ( | |||
| currentUser && | |||
| isPermitted(currentUser.permissions, `eventdefinitions:read:${params.definitionId}`) && | |||
| refetch | |||
| ) { | |||
| EventDefinitionsActions.get(params.definitionId).then( | |||
| (response: any) => { | |||
| const eventDefinitionResp = response.event_definition; | |||
|
|
|||
| // Inject an internal "_is_scheduled" field to indicate if the event definition should be scheduled in the | |||
| // backend. This field will be removed in the event definitions store before sending an event definition | |||
| // back to the server. | |||
| eventDefinitionResp.config._is_scheduled = response.context.scheduler.is_scheduled; | |||
| setEventDefinition(eventDefinitionResp); | |||
| }, | |||
| (error) => { | |||
| if (error.status === 404) { | |||
| history.push(Routes.ALERTS.DEFINITIONS.LIST); | |||
| } | |||
| }, | |||
| ); | |||
| const queryClient = useQueryClient(); | |||
| const { data, isFetching } = useGetEventDefinition(params.definitionId); | |||
|
|
|||
Comment on lines
+78
to
+88
| const { scopePermissions } = useGetPermissionsByScope(eventDefinition); | ||
|
|
||
| useEffect(() => { | ||
| EventNotificationsActions.listAll(); | ||
| }, []); | ||
|
|
||
| useEffect(() => { | ||
| if (!isFetching && !eventDefinition) { | ||
| history.push(Routes.ALERTS.DEFINITIONS.LIST); | ||
| } | ||
| }, [currentUser, history, params, refetch]); | ||
| }, [eventDefinition, history, isFetching]); |
| </HelpPanel> | ||
| </Col> | ||
| )} | ||
| <Clearfix /> |
…t/14351-sigma-event-definitions-add-summary-component
…t/14351-sigma-event-definitions-add-summary-component
danotorrey
approved these changes
Jun 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add summary and condition form components for Sigma-based event definitions, enabling view, edit, and delete directly from the Event Definitions page.
closes: Graylog2/graylog-plugin-enterprise#14351
/prd https://github.com/Graylog2/graylog-plugin-enterprise/pull/14143
/nocl
Description
SigmaConditionFormandSigmaEventConditionFormplugin components to support editing Sigma event definition scheduling, streams, filters, and cron configurationSigmaEventSummaryContainerto plug the existing Sigma summary into the event definition summary viewsigma-v1event definition type in the enterprise plugin bindings withformComponentandsummaryComponentSigmaEventSummarycomponent to display cron scheduling details (expression, human-readable description, and timezone)_is_scheduletypo to_is_scheduledand added cron-related fields toSigmaConfigTypeEventConditionFormto always include the current condition plugin type in the dropdown even when it is excluded from the filtered list (e.g. Sigma), and fixed layout so the help panel renders independently of the form componentEventDefinitionActionsto allow editing and deleting Sigma event definitions from the Event Definitions page; removed the restriction that forced deletion via the Sigma Rules pageViewEventDefinitionPageto use theuseGetEventDefinitionReact Query hook anduseGetPermissionsByScopeinstead of manual store calls withuseState/useEffect; conditionally shows Edit/Duplicate actions based on scope permissionsMotivation and Context
Sigma-based event definitions lacked the form and summary plugin bindings needed to view, edit, or delete them from the Event Definitions page. Users were forced to manage Sigma rules exclusively through the Sigma Rules page, which created a fragmented experience.
How Has This Been Tested?
Unit tests
Screenshots (if appropriate):
Types of changes
Checklist: