-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Events page refactoring with entity data table usage #20831
base: master
Are you sure you want to change the base?
Events page refactoring with entity data table usage #20831
Conversation
const hasReplayInfo = !!event.replay_info; | ||
|
||
const moreActions = [ | ||
hasReplayInfo ? <MenuItem key="replay_info"><LinkToReplaySearch id={event.id} isEvent /></MenuItem> : null, | ||
pluggableActions.length && hasReplayInfo ? <MenuItem divider key="divider" /> : null, | ||
pluggableActions.length ? pluggableActions : null, |
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.
const hasReplayInfo = !!event.replay_info; | |
const moreActions = [ | |
hasReplayInfo ? <MenuItem key="replay_info"><LinkToReplaySearch id={event.id} isEvent /></MenuItem> : null, | |
pluggableActions.length && hasReplayInfo ? <MenuItem divider key="divider" /> : null, | |
pluggableActions.length ? pluggableActions : null, | |
const hasReplayInfo = !!event.replay_info; | |
const isNotSystemEvent= !event.event_definition_type.startsWith('system-notifications'); | |
const moreActions = [ | |
hasReplayInfo ? <MenuItem key="replay_info"><LinkToReplaySearch id={event.id} isEvent /></MenuItem> : null, | |
pluggableActions.length && hasReplayInfo && isNotSystemEvent ? <MenuItem divider key="divider" /> : null, | |
pluggableActions.length && isNotSystemEvent ? pluggableActions : null, |
I recently made a change to show the pluggable actions independent of replay_info
being available. These pluggable actions should actually be available for all non-system-notification
events. This may be able to be done in a prettier way, but using the isNotSystemEvent
logic should correctly display the actions menu.
Description
This PR implements an events page on a general perspective with Entity Data Table usage
Now we can choose which columns to show. The rest is hidden under the expanded row
Event actions are in the action column now
We have the option to filtrate events by type and timestamp
And now it's possible to sort events by some of the fields
The changes also touch the default event details of the events widget
Motivation and Context
As the current implementation of the Events page uses the legacy code, we need to do refactoring first before implementing the new functionality. We need to use Entity Data Table on the page as we use it on other pages. This would allow us to use common approaches. We have to do refactoring for the general approach first and then reuse it on a security perspective as well.
fix: #20881
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
/jpd https://github.com/Graylog2/graylog-plugin-enterprise/pull/9020