-
Notifications
You must be signed in to change notification settings - Fork 24
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
add button to reload data buckets for each layer #4383
Conversation
ToDo:
|
I think the backend should also be adapted (change the clear bucket cache api so it supports selecting the layer), right? |
If it's quick to implement, then, yes. Otherwise, it's not that big of a deal to clear the entire dataset, I think. As long as the local buckets are not discarded for all layers, the UX will be fine, at least. |
await clearCache(this.props.dataset); | ||
api.data.reloadBuckets(layerName); | ||
Toast.success( | ||
`Successfully deleted cached data of layer ${layerName}. Now move a bit around to reload the data.`, |
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.
We shouldn't force the user to move around to see the new data. Setting window.needsRerender = true;
above should do the trick here :)
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.
This does not work for me. Do you have any other suggestions or know why it might not be working?
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.
Hm, let's have a look together at this.
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.
maybe this helps app.vent.trigger("rerender");
🤷♂️ . Just saw it in our code base.
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.
I had a look and fixed it now :) The layer rendering manager had to be refreshed.
@MichaelBuessemeyer I just pushed the necessary changes, so the backend can clear the cache of one layer only. I also added the new |
@fm3 could you review the backend part? Thanks 😄 |
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.
Backend LGTM
works perfectly. |
Thanks a lot @youri-k |
@MichaelBuessemeyer Awesome stuff! Only a minor request from my side: Could you move the reload/find-data buttons so that they align with the right side of the histogram? Right now, it looks a bit weird in my opinion 🙈 |
@philippotto Could you please review my changes? I arranged the buttons with the right edge of the histogram. |
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.
Awesome! I'm very looking forward to this feature :)
This PR adds a button to reload all cached buckets of a data layer in the frontend.
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
[ ] Updated migration guide if applicable[ ] Updated documentation if applicable[ ] Adapted wk-connect if datastore API changes