-
Notifications
You must be signed in to change notification settings - Fork 33
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
Retrieve dashboard by name/title #9
Conversation
Codecov Report
@@ Coverage Diff @@
## main #9 +/- ##
==========================================
- Coverage 87.55% 87.17% -0.38%
==========================================
Files 17 17
Lines 659 663 +4
==========================================
+ Hits 577 578 +1
- Misses 82 85 +3
Continue to review full report at Codecov.
|
Dear @luixx, thanks a stack for your contribution. Do you believe you can add a corresponding test case? With kind regards, |
Hi, yes i will do this. It probabl takes a little bit. Greetings Karsten |
grafana_client/elements/dashboard.py
Outdated
:return: | ||
""" | ||
get_dashboard_path = "/dashboards/db/%s" % dashboard_name | ||
r = self.api.GET(get_dashboard_path) |
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.
Hi Karsten,
thank you for adding a test case. Currently, it croaks on this line with AttributeError: 'Dashboard' object has no attribute 'api'
1.
While refactoring the package, we slightly changed its internals, so on this spot, self.api
became self.client
:
r = self.api.GET(get_dashboard_path) | |
r = self.client.GET(get_dashboard_path) |
Can you amend your patch correspondingly? If everything goes right after that, the tests should succeed 2.
With kind regards,
Andreas.
Footnotes
-
https://github.com/panodata/grafana-client/runs/5128322276 ↩
-
In order to verify it, you can run the test suite on your workstation, like documented in the README 3.
If that is not possible, you can also inspect the outcome from the test suite by following the links in the "checks" section below.
↩
So, i hope everything is fine now. |
Excellent. Thank you again! |
Dear Karsten, we just relased With kind regards, |
Description
Coming from m0nhawk/grafana_api#91, there is the new function
get_dashboard_by_name
introduced so the dashboards can be found by name and not only id.Checklist