Feature/sse html5 notifications#25
Closed
udragon wants to merge 8 commits intoIcinga:masterfrom
udragon:feature/sse-html5-notifications
Closed
Feature/sse html5 notifications#25udragon wants to merge 8 commits intoIcinga:masterfrom udragon:feature/sse-html5-notifications
udragon wants to merge 8 commits intoIcinga:masterfrom
udragon:feature/sse-html5-notifications
Conversation
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.
Hello guys,
I wanted to add html5 web notifications when new alerts arrive. I needed this feature for my operation center team, so I learned the code a little bit and contributed :-)
I implemented a few things for this to happen:
so, In short, the notification flows this way:
icinag2 notification script --> sse.php --> events file
events file --> sse.php --> JS EventSource --> JS Notification
Hope that's clear. I'm sure you will want to do some changes, feel free.
I didn't thought about security here, so you probably will want to add a token here for adding a new event.
Edit : I looked at this more carefully and I think better base my notifications on the monitoring module notifications. I close this pull request and open a new one when I finish.