Fixed bug: task creation progressbar (#13)

fixed rounding in callbacks
main
Kirill Lakhov 4 years ago committed by GitHub
parent 26d49abdf6
commit aebb70c303
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- TDB
### Fixed
- TDB
- Task creation progressbar bug (<https://github.com/cvat-ai/cvat/issues/12>)
### Security
- TDB

@ -1,12 +1,12 @@
{
"name": "cvat-core",
"version": "5.0.1",
"version": "5.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "cvat-core",
"version": "5.0.1",
"version": "5.0.2",
"license": "MIT",
"dependencies": {
"axios": "^0.21.4",

@ -1,6 +1,6 @@
{
"name": "cvat-core",
"version": "5.0.1",
"version": "5.0.2",
"description": "Part of Computer Vision Tool which presents an interface for client-side integration",
"main": "babel.config.js",
"scripts": {

@ -75,7 +75,7 @@
onProgress(bytesUploaded) {
if (onUpdate && Number.isInteger(totalSentSize) && Number.isInteger(totalSize)) {
const currentUploadedSize = totalSentSize + bytesUploaded;
const percentage = Math.round(currentUploadedSize / totalSize);
const percentage = currentUploadedSize / totalSize;
onUpdate(percentage);
}
},

@ -1,12 +1,12 @@
{
"name": "cvat-ui",
"version": "1.37.0",
"version": "1.37.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "cvat-ui",
"version": "1.37.0",
"version": "1.37.1",
"license": "MIT",
"dependencies": {
"@ant-design/icons": "^4.6.3",

@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.37.0",
"version": "1.37.1",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {

@ -44,7 +44,7 @@ export const importDatasetAsync = (instance: any, format: string, file: File): T
}
dispatch(importActions.importDataset(instance.id));
await instance.annotations.importDataset(format, file, (message: string, progress: number) => (
dispatch(importActions.importDatasetUpdateStatus(progress * 100, message))
dispatch(importActions.importDatasetUpdateStatus(Math.floor(progress * 100), message))
));
} catch (error) {
dispatch(importActions.importDatasetFailed(instance, error));

Loading…
Cancel
Save