Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Implement read & delete by UID as per Grafana depreciating #25

Merged
merged 1 commit into from
Jan 25, 2020

Conversation

jleeh
Copy link
Contributor

@jleeh jleeh commented Sep 16, 2019

As per the Grafana docs, the get & delete API calls by slug are now deprecated:
https://grafana.com/docs/http_api/dashboard/#deprecated-resources

Updated this client to include the new endpoints, as for me it was causing issues with the Terraform Grafana provider which depends on this library.

Since the endpoints return the same schema, I've just converted the existing methods to accept a URL rather than just a slug.

Can't see any specific tests for these endpoints.

@jleeh jleeh mentioned this pull request Sep 16, 2019
@mlclmj
Copy link
Contributor

mlclmj commented Oct 10, 2019

Hey @jleeh, sorry for the delay getting to this. I know there's no existing tests for the dashboards API methods (before my time maintaining this repo), but would you mind adding a new dashboard_test.go file and start with just adding some basic tests for the methods which you've modified and added in this PR?

@mlclmj mlclmj added enhancement size/S Denotes a PR that changes 10-29 lines labels Oct 10, 2019
@MrLuje
Copy link

MrLuje commented Dec 20, 2019

I would be interested to see this PR merged.
@jleeh if it's ok with you, I'll make a PR on your branch to add the tests

@matthiasng
Copy link
Contributor

matthiasng commented Dec 23, 2019

Grafana 5 released on 1 Mar 2018. I really think it is time to support the uid field.

@mlclmj Can we just merge this PR please ? Im already working on some tests for the dashboard api. PR is coming soon.

@matthiasng
Copy link
Contributor

See PR #31 (dashboard tests). As soon as this PR is merged, i will extend the dashboard tests.

@mlclmj mlclmj merged commit 5aaccba into nytm:master Jan 25, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
enhancement size/S Denotes a PR that changes 10-29 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants