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

Add alertnotification API support #53

Merged
merged 3 commits into from
Jan 17, 2020

Conversation

GiedriusS
Copy link
Collaborator

@GiedriusS GiedriusS commented Jan 3, 2020

Add alertnotification.go which contains the struct definition of an
alertnotification. Add rest-alertnotification.go which contains the
API wrappers. Edit panel.go to remove the old definition of an
alertnotification since it is not complete and it belongs in its own
file.

Tested with internal integration tests with Grafana 6.5.2.

PR is based on my other PR: #52

Add a new member to the `Datasource` struct called SecureJSONData which
gets passed as `secureJsonData`. This is needed because certain features
are only available via that e.g. passing custom header values.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
Add `alertnotification.go` which contains the struct definition of an
`alertnotification`. Add `rest-alertnotification.go` which contains the
API wrappers. Edit `panel.go` to remove the old definition of an
alertnotification since it is not complete and it belongs in its own
file.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
@coveralls
Copy link

coveralls commented Jan 3, 2020

Coverage Status

Coverage decreased (-1.5%) to 15.197% when pulling a8548f1 on GiedriusS:add_alertnotification into 690a0c6 on grafana-tools:master.

It is actually simply `/api/alert-notifications/:id`
@GiedriusS GiedriusS marked this pull request as ready for review January 12, 2020 12:04
@grafov
Copy link
Member

grafov commented Jan 17, 2020

Well, the proposed changes look good for me. Let merge them. If you could decide to add the tests it will be great though :)

@grafov grafov merged commit 01e30e2 into grafana-tools:master Jan 17, 2020
@grafov
Copy link
Member

grafov commented Jan 17, 2020

@GiedriusS thank you for this contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants