-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Dashboard: Store original JSON in DashboardModel #73881
Conversation
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.
Looks good.
Thought - do we need to save in in Store? For the sake of simplicity, maybe just having it as a private property with a getter on DashboardModel would be sufficient, given the original dashboard is already passed in there via constructor, and dashboard model is available downstream the components on Dashboard page.
That's a good point and should make the code a bit simpler. |
* Dashboard: Save original JSON to state * Dashboards: Update tests * Dashboards: Fix original json access * Dashboard: Save original to the DashboardModel * Dashboard: Cleanup tests * Remove original db setter
What is this feature?
Save the original dashboard JSON inside the DashboardModel instead of making an extra API request to fetch it when saving.
Why do we need this feature?
Removes an extra API request for fetching dashboard JSON when checking if there were any changes to the dashboard on save.
Special notes for your reviewer:
Please check that: