-
Notifications
You must be signed in to change notification settings - Fork 26
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
Refactor of the export csv button to export more than 500 documents max #993
Conversation
Allowing users to now download more than 500 lines
✅ Deploy Preview for heuristic-goodall-67c4b1 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Can you improve the PR title and also assign it to you please?
And remove the exportCsvModal component since it's not used anymore
6d55a56
to
a4f1049
Compare
Export doesn't work with huge collection (example: more than 10k documents). I think an better client solution it's to use Web Worker for non blocking process an split treatment in chunk. |
Using the export method is the proper way to download large amount of documents directly from the backend, this method is able to handle extremely large amount of data by streaming them directly from the backend, you should be able to download the file directly by letting the browser open the following url |
@Shiranuit It's not possible to provide the authentication token in GET params of url ? |
If the SDK use the cookie auth then the auth cookie should be forwarded automatically no? |
@sebtiz13 Actually it's not possible to provide the authentication token directly in the URL, also it's not recommended even though query params are encrypted, the proper solution would be with cookies but it might not be possible if this is disabled by the backend
@Aschen Yes it might work with the cookie but this will require the admin console to support login with cookies which is not the case right now, I dont think this will be that hard to implement, but this also means that if the cookies are disable on the Kuzzle instance the export will not be possible, and the admin-console should also handle this case |
@Shiranuit I think cookie auth should be default, isn't it the case ? Otherwise I agree but if the backend didn't enable cookies I don't see how we can properly authenticate the client.. |
Ok like I say it's understandable not to be able to provide directly token in GET parameters, but what you think of solution of generate a temporary token for export ? |
@sebtiz13 We could do this but it require some backend development for Kuzzle |
* improving style * hiding the modal when the dowmload button is clicked
Refactor of the export csv button to export more than 500 documents max
Refactoring the export csv function to know export more than 500 documents max
How should this be manually tested?
Other changes
deleted the function convertToCSV() from src/services/cllectionHelper.ts