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
Alert condition titles #2282
Merged
Merged
Alert condition titles #2282
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
93ca197
Adding title field for Alert Conditions.
dennisoelkers 78e1341
Consolidating repeated content negotiation annotations.
dennisoelkers af24194
Reformaating resources.
dennisoelkers 9195358
Adapting tests to added title attribute.
dennisoelkers e8a5abc
Removing unneeded public declaration.
dennisoelkers 672d5d1
Using correct way to retrieve alert conditions from stream.
dennisoelkers b37db7f
Showing/updating alert condition title in overview.
dennisoelkers b1d5a74
Using proper types for alert conditions in REST resource.
dennisoelkers c3fed47
Adding model response classes.
dennisoelkers 87ece4c
Annotating potential nulls.
dennisoelkers c3c9b25
Documenting API change in upgrade notes.
dennisoelkers 59fef0f
Style alert condition title helper text
78ebcdb
Fixing linter hints of touched files.
dennisoelkers 0018225
Serializing type enum as lowercase.
dennisoelkers 644e6f0
Unifying response format of alert conditions.
dennisoelkers 49de2cc
Move help text styling into a stylesheet file
b4bf0eb
Unifying alert condition titles.
dennisoelkers 357f945
Remove default parameters so defaults are used.
dennisoelkers File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
This would break existing plugins that are working with Graylog 2.0.x and which are using this method. Any reason to remove it and not simply mark it as deprecated (to remove it in Graylog 3.x)?
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.
The method, as it was before, was plain broken. It worked only because of type erasure, as it was actually returning a
Collection<BasicDBObject>
. It was only used implicitly by Jackson when serializing aStream
instance as JSON, so it was also using a different representation that any other place that was serializing anAlertCondition
instance and it was only identical by accident.It was also a duplicate of
StreamService#getAlertConditions
which goes the hard path of instantiating an actualAlertCondition
. Unfortunately we cannot just move that logic to the Stream implementation class (or pass the list of correct alert conditions to its constructor) as theAlertCondition
instance itself references theStream
which holds it.It's not the cleanroom technique to just remove it for a minor version, but it's actually balancing between api breakage and offering a method that is just plain broken.
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.
✅ Works for me. At least it'll be obvious for plugin authors and users when stuff breaks.
But please add this to the
UPGRADING.rst
file.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.
Check!