-
Notifications
You must be signed in to change notification settings - Fork 16
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
170 - Integration files total download size #192
170 - Integration files total download size #192
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.
): Promise<number> { | ||
return getDatasetFilesTotalDownloadSize | ||
.execute(datasetPersistentId, datasetVersion.toString(), FileDownloadSizeMode.ARCHIVAL) | ||
.catch((error: WriteError) => { |
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 should never throw a WriteError, but rather a ReadError, as it is a read operation.
I'm not sure if this happens elsewhere too, could you check?
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 added 2 commits
- I found that the error when running the dev-env was because the package-lock.json wasn't being copied to the docker image so there were some conflicts between the dependencies because npm was using the last version of the libraries. I added a commit to fix this
- You're right about the error types, I fixed it everywhere and I'll put more attention next time when adding those types, 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.
…ownload-size 170 - Integration files total download size
What this PR does / why we need it:
This PR integrates the frontend with the getDatasetFilesTotalDownloadSize use case from js-dataverse to get the total download size of the dataset files. This is used in the UI to display the Zip Download Limit Message to the user when they select all rows and the Files Table is paginated.
Which issue(s) this PR closes:
Special notes for your reviewer:
Changes
Suggestions on how to test this:
Step 1: Run the development environment
npm i
cd packages/design-system && npm run build
cd ../../
.env
file such as the .env.example, with theVITE_DATAVERSE_BACKEND_URL=http://localhost:8000
variablecd dev-env
./run-env.sh 9958-dataset-files-size
Step 2: Test Dataset View mode with the implemented changes for the getDatasetFilesTotalDownloadSize
curl -X PUT -d 1 http://localhost:8000/api/admin/settings/:ZipDownloadLimit
?persistentId=doi:10.5072/FK2/LHGRHP&version=DRAFT
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No
Is there a release notes update needed for this change?:
No
Additional documentation: