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

Update the actions example, template panels enclosed in rows #172

Merged
merged 4 commits into from Jan 4, 2023

Conversation

rbarry82
Copy link
Contributor

@rbarry82 rbarry82 commented Jan 4, 2023

Issue

Grafana 9 also allows for setting top-level "rows" as a key, which contains an array of objects, potentially including "panels".

In the case of dashboards which contain only rows, grafana_dashboard previously threw an exception, but we should cover the case also.

Solution

If a "rows" key is present, iterate through it and modify the panels contained within. Use .get() for the "panels" key to avoid a KeyError.

Context

Closes #166
Closes #170
Closes #164

Release Notes

Behave appropriately when rows are found (or only rows). Update the README for Juju3 actions.

README.md Outdated Show resolved Hide resolved
lib/charms/grafana_k8s/v0/grafana_dashboard.py Outdated Show resolved Hide resolved
rbarry82 and others added 2 commits January 4, 2023 16:39
Co-authored-by: Leon <82407168+sed-i@users.noreply.github.com>
@rbarry82 rbarry82 merged commit c3dfc97 into main Jan 4, 2023
@rbarry82 rbarry82 deleted the candidate-1.1 branch January 4, 2023 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants