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

Add progress bar when exporting Applications #261

Merged
merged 9 commits into from
Aug 17, 2023
Merged

Add progress bar when exporting Applications #261

merged 9 commits into from
Aug 17, 2023

Conversation

torchiaf
Copy link
Contributor

@torchiaf torchiaf commented Jun 26, 2023

Fixes #223
Fixes #254

Blocked by #294

Technical Notes

  • Latest jszip version 3.10.1 significantly speed ups zip files generation and then download process.
  • Feedbacks about the UI implementation are welcome.

Layout

Export -progress

Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

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

I couldn't quite get this to work

  • The values and chart bars complete almost straight away
  • the images chart
    • remains on zero for a long time
      • We should have some status text before showing the progress bar. that can be replaced when we get the first chunk through
    • when we start getting download progress notifications it moves up to 1/3 or a 1/2 then stops
    • the network request eventually completes (possibly times out at 2mins)
    • nothing else happens (no file download, progress bar stuck

dashboard/pkg/epinio/dialog/ExportAppDialog.vue Outdated Show resolved Hide resolved
@richard-cox richard-cox added this to the v1.10.0 milestone Jul 25, 2023
@torchiaf
Copy link
Contributor Author

torchiaf commented Jul 31, 2023

I couldn't quite get this to work

  • The values and chart bars complete almost straight away

  • the images chart

    • remains on zero for a long time

      • We should have some status text before showing the progress bar. that can be replaced when we get the first chunk through
    • when we start getting download progress notifications it moves up to 1/3 or a 1/2 then stops

    • the network request eventually completes (possibly times out at 2mins)

    • nothing else happens (no file download, progress bar stuck

  • Values and Charts downloads are instant, so progress bar disappears before showing any progress. We could mock the progress bar here or merge the 3 bars into one and assign a weight to each part of the final final zip file.
  • I'm sure it worked at the time this PR was open, so I guess there is some back-end issue. I'll update the backend in the test environment and check again. It was a regression caused by coping all headers in the backend code: Copy response headers through proxied requests ui-backend#35.
    the last commit has fixed the bug.

@torchiaf
Copy link
Contributor Author

torchiaf commented Aug 2, 2023

I've merged the progress bars into one, showing also the parts being downloading and the compression phase.

progress-bar

Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

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

click away
cancel should cancel requerst
message for compressing files

Things we should capture in another issue / PR

  • modal should be block... so if the user accidentally clicks outside of modal they don't lose the last x minutes of progress
  • minor want, clicking cancel will cancel the http request to fetch the image. not sure if this is possible though

showProgressBar: false,
downloadingPart: null,
progressBar: 0,
colorStops: { 0: '--success', 100: '--success' },
Copy link
Member

Choose a reason for hiding this comment

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

not sure i picked up on this before, these should be primary colour.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

primary is gray in the PercentageBar.

Copy link
Member

Choose a reason for hiding this comment

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

the issue is that the bar is green when in progress, when it should be the primary colour. once complete we could change it to success / green, though it might be jarring as it'll flash up on screen. if the progress bar shows grey for --primary we should find another colour to show

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll try to change the PercentageBar component

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
@torchiaf
Copy link
Contributor Author

torchiaf commented Aug 4, 2023

I did a couple of adjustments changing the name of content-length header from proxied request.
The x-content-length was removed by be team, this is probably the cause of the issues during your last test @richard-cox .

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
@richard-cox
Copy link
Member

richard-cox commented Aug 8, 2023

I still don't see the progress bar changing during the image download, only at the end once the request has completed. This matches the state in the backend. We'll go over this in the sync up

As discussed, lets test this in production. Can you create an issue?

It could be that the dev world ui-backend-->epinio instance request takes a long time (far away from each other) ... and client-->ui-backend takes a short time (close to each other). In prod this will be the opposite. We've seen that the progress indicator moves incrementally for the client --> ui-backend, so we might be alright.

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
@torchiaf
Copy link
Contributor Author

Thanks @richard-cox , I fixed trhe bar color. I think the last open point is to test the behavior (speed) of downloads,

@torchiaf torchiaf merged commit e345afa into epinio:main Aug 17, 2023
4 checks passed
@richard-cox richard-cox added the kind/enhancement New feature or request label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
2 participants