Skip to content
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

Validate alarm callbacks before saving them #3262

Merged
merged 6 commits into from Dec 28, 2016
Merged

Validate alarm callbacks before saving them #3262

merged 6 commits into from Dec 28, 2016

Conversation

@edmundoa
Copy link
Member

@edmundoa edmundoa commented Dec 28, 2016

As described in #987 and #3236, we didn't validate alarm callbacks when created, so most errors were only displayed when the alarm callback was triggered.

This PR checks alarm callbacks when created or updated, ensuring the new alarm callbacks stored in MongoDB are valid.

To make this nicer for the user, we are also returning a more informative message in the API, and displaying that message in the web interface.

Fixes #987 and #3236

edmundoa added 6 commits Dec 28, 2016
After create or update alarm callbacks, check their configuration before
saving them.

We are doing this on the REST resources in charge of those operations to
avoid breaking existing alarm callbacks.

Fixes #3236
Show validation errors in error message when creating or updating alarm
callbacks (aka notifications).
@edmundoa edmundoa added this to the 2.2.0 milestone Dec 28, 2016
@bernd bernd self-assigned this Dec 28, 2016
@bernd
bernd approved these changes Dec 28, 2016
Copy link
Member

@bernd bernd left a comment

LGTM 👍

@bernd bernd merged commit 14d9615 into master Dec 28, 2016
4 checks passed
4 checks passed
ci-web-linter Jenkins build graylog-pr-linter-check 1210 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
@bernd bernd deleted the issue-3236 branch Dec 28, 2016
@bernd bernd removed the ready-for-review label Dec 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.