-
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
Add sse support for alert center, no need to manually refresh the page, add slide-in animation #3051
Conversation
This file contains 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
… notifications - Add AlertSseManager to handle SSE emitters and broadcast alerts - Create AlertSseController to manage SSE connections - Update AlertNoticeDispatch to send alerts via SSE - Modify NotifyComponent to use SSE for real-time updates - Update Manager to enable async support
…ts (SSE) - Add SSE subscription to receive real-time alerts - Update alert list with new data from SSE - Handle SSE errors and close connection on component destruction- Remove refresh button as real-time updates eliminate the need for manual refreshing
- Add log statement in AlertNoticeDispatch before broadcasting alert to SSE client - Improve traceability and debugging for alert broadcasting process
- Add slide-in animation for new alerts - Implement alert filtering based on status and content - Update alert list handling in component - Modify alert store and dispatch logic - Format alert timestamps in JSON response
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.
license-eye has checked 2975 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
1544 | 2 | 1429 | 0 |
Click to see the invalid file list
- hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/config/AlertSseManager.java
- hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/controller/AlertSseController.java
Use this command to fix any missing license headers
```bash
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix
</details>
hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/config/AlertSseManager.java
Show resolved
Hide resolved
hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/controller/AlertSseController.java
Show resolved
Hide resolved
…fig/AlertSseManager.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Logic <[email protected]>
…troller/AlertSseController.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Logic <[email protected]>
…tSseManager - Added class comment for AlertSseController: "SSE controller for alert" - Added class comment for AlertSseManager: "SSE manager for alert" - Improved code readability and maintainability
- Introduce mock object for AlertSseManager - Inject the mock into AlertNoticeDispatch instance - This change prepares for testing server-sent events (SSE) related functionality
- Introduce mock object for AlertSseManager - Inject the mock into AlertNoticeDispatch instance - This change prepares for testing server-sent events (SSE) related functionality
tomsun28
approved these changes
Feb 6, 2025
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.
lgtm!
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.
What's changed?
Add sse support for alert center, no need to manually refresh the page, add slide-in animation
20250205171458.mp4
Checklist
Add or update API