-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
feat: update IDs when importing dashboards #11991
feat: update IDs when importing dashboards #11991
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11991 +/- ##
==========================================
- Coverage 67.72% 60.54% -7.19%
==========================================
Files 951 906 -45
Lines 46603 44699 -1904
Branches 4558 4051 -507
==========================================
- Hits 31563 27064 -4499
- Misses 14927 17635 +2708
+ Partials 113 0 -113
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
df2c7c8
to
0261f87
Compare
0261f87
to
59f5bc0
Compare
] | ||
|
||
if "filter_scopes" in metadata: | ||
# in filter_scopes the key is a chart ID as a string; we nede to udpate |
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.
nit typos
SUMMARY
Dashboards reference charts by their IDs in their JSON attributes (
position_json
andjson_metadata
). When importing a dashboard we need to update the IDs to the new ones, since imported charts will probably have different IDs.In this PR we use the chart UUID to update references to charts inside the metadata of dashboards.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TEST PLAN
Updated unit test showing the chart ID is updated across all attributes.
ADDITIONAL INFORMATION