Comments (6)
Hi again,
finally, I have been able to dedicate some time to this. I have been able to whip together a reproduction [1] which can be invoked idempotently and I am able to confirm that it happens with all of the most recent Grafana releases of 5.x, 6.x, 7.x.
With kind regards,
Andreas.
[1] https://gist.github.com/amotl/43bb89107227431802556b7bcb135578
from grafana_api.
The solution is to say:
def update_dashboard(self, dashboard):
"""
:param dashboard:
:return:
"""
put_dashboard_path = "/dashboards/db"
if "meta" in dashboard and "folderId" in dashboard["meta"]:
dashboard = dashboard.copy()
dashboard["folderId"] = dashboard["meta"]["folderId"]
r = self.api.POST(put_dashboard_path, json=dashboard)
return r
I will submit a corresponding pull request.
from grafana_api.
Dear Andrew,
I wish you a happy new year!
As we are currently preparing a new release of grafana-wtf, may I humbly ask you to take a look at #85, where we tried to mitigate this problem which manifests when roundtripping dashboard payloads through get_dashboard()
and update_dashboard()
?
I tried to supplement the mitigation with appropriate tests and will be happy about any advises from your end.
With kind regards,
Andreas.
from grafana_api.
+1
When can this get merged? Running into a use case for this where I would want to update/create a dashboard to a specific folder and not "General"
from grafana_api.
Dear Jack,
see #85 (comment) for a workaround.
With kind regards,
Andreas.
from grafana_api.
Hi again,
we integrated this patch into the grafana-client
code base with grafana-toolbox/grafana-client#7.
With kind regards,
Andreas.
from grafana_api.
Related Issues (20)
- Not able to establish Connection using pip lib grafana_api HOT 4
- Giving access denied HOT 3
- Missing permissions API HOT 1
- Support for notification channels
- Connection timeout
- folder.create_folder() doesn't create folder, but returns the list of existing folder HOT 2
- List Annotation wrong parameter name HOT 2
- json: cannot unmarshal string into Go value of type dtos.AdminCreateUserForm'}, {'fieldNames': ['Password'], 'classification': 'RequiredError', 'message': 'Required HOT 4
- Error when switching to another organization HOT 3
- create_organization("name") TypeError: string indices must be integers HOT 1
- folder/dashboard _update functions fail if not exists with overwrite=True HOT 1
- API token, Unauthorized? HOT 2
- Having trouble with create_new_snapshot() function HOT 1
- Documentation links point to page that returns 404
- how to get the json of home dashboard ?
- Future maintenance of this repository and package HOT 4
- Can I duplicate a new dashboard from an existing dashboard HOT 2
- Suggestion for Improvement "get_dashboard_by_name" HOT 1
- Checking connection status HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana_api.