Skip to content
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

Fix task data upload progress bar #4134

Merged
merged 2 commits into from
Jan 10, 2022
Merged

Conversation

klakhov
Copy link
Contributor

@klakhov klakhov commented Jan 10, 2022

Motivation and context

In recent patches onUpdate cvat-ui status callback signature was changed. Tus client upload used old signature that led to bug in progress bar:
upload-progressbar-bug

How has this been tested?

Manual testing

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

bsekachev
bsekachev previously approved these changes Jan 10, 2022
Copy link
Member

@bsekachev bsekachev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update CHANGELOG?

@@ -414,7 +414,7 @@ export function createTaskAsync(data: any): ThunkAction<Promise<void>, {}, {}, A
dispatch(createTask());
try {
const savedTask = await taskInstance.save((status: string, progress: number): void => {
dispatch(createTaskUpdateStatus(status + (progress !== null ? ` ${Math.floor(progress * 100)}%` : '')));
dispatch(createTaskUpdateStatus(status + (progress ? ` ${Math.floor(progress * 100)}%` : '')));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the progress is 0, it does not show any progress. Maybe to keep !== null check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, lets pass null if no progress has to be specified

@bsekachev bsekachev merged commit 8e4dd14 into develop Jan 10, 2022
@nmanovic nmanovic deleted the kl/fix-task-progressbar branch January 14, 2022 15:32
@nmanovic nmanovic mentioned this pull request Mar 4, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants