Skip to content

fix(14755): Fix Event Definition type filter wording and missing system notification type - #27397

Open
zeeklop wants to merge 5 commits into
masterfrom
fix/14755-event-definition-type-filter-fixes
Open

zeeklop wants to merge 5 commits into
masterfrom
fix/14755-event-definition-type-filter-fixes

Conversation

@zeeklop

@zeeklop zeeklop commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Description

  • Renamed the Event Definitions page's "Type" filter/column label to "Event Definition Type" in EventDefinitionsResource.java, so it no longer shares wording with the unrelated Alert/Event type filter on the Alerts & Events page.
  • Added a frontend eventDefinitionTypes plugin-registry entry for system-notifications-v1 (bindings.ts), so the System Event Definition type now appears as a filter option. It follows the same hideFromCreation pattern used for sigma-v1/sigma-correlation-v1 (visible as a filter, hidden from the create wizard, no form/summary component since it's never user-editable). Made formComponent/summaryComponent optional on EventDefinitionType in types.ts to support that.
  • sigma-correlation-v1 was already showing up correctly (fixed by an unrelated commit merged after this issue was filed), so no changes were needed for that part.

Motivation and Context

Closes: Graylog2/graylog-plugin-enterprise#14755

The Event Definitions type filter had inconsistent wording (same label as the unrelated Alerts & Events type filter) and was missing the system-notifications-v1 type.

How Has This Been Tested?

  • yarn tsgo, yarn lint:path on changed files
  • yarn test --testPathPatterns=event-definitions (19 suites / 121 tests)
  • yarn test --testPathPatterns=components/events (13 suites / 58 tests, covers ColumnRenderers/EventDefinitionTypeRenderer)
  • ./mvnw test -pl :graylog2-server -Dtest=EventDefinitionsResourceTest -Dskip.web.build=true -Dmaven.javadoc.skip=true (10/10 tests)
  • Added new test bindings.test.ts covering the new registry entry.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved issues were identified in the reviewed changes.

Pull request overview

Fixes Event Definition type labeling and adds system-notifications-v1 to the frontend type filter.

Changes:

  • Renames the type label to “Event Definition Type”.
  • Registers system notifications as a filter-only type.
  • Makes components optional for non-editable types.
  • Adds tests and a changelog entry.
File summaries
File Summary
graylog2-web-interface/src/components/event-definitions/types.ts Allows component-less event definition types.
graylog2-web-interface/src/components/event-definitions/event-definition-types/bindings.ts Registers the system event definition type.
graylog2-web-interface/src/components/event-definitions/event-definition-types/bindings.test.ts Tests the new registry entry.
graylog2-server/src/main/java/org/graylog/events/rest/EventDefinitionsResource.java Updates the type attribute label.
changelog/unreleased/issue-14755.toml Documents the fix.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@danotorrey danotorrey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and tests successfully. Just one CL change needed to add pull request number.

@@ -0,0 +1,4 @@
type = "fixed"
message = "Rename the Event Definitions type filter to \"Event Definition Type\" and include the System Event Definition type as a filter option."

@danotorrey danotorrey Sep 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add PR number to CL.

Suggested change
pulls = ["27397"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants