mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-19 19:29:03 +00:00
Modified progrss bar handler
This commit is contained in:
parent
78f77dc881
commit
726562d615
@ -75,6 +75,7 @@ export class AddImageDialogComponent implements OnInit, DoCheck {
|
||||
.pipe(catchError((error) => of(error)));
|
||||
this.forkObservable.push(object);
|
||||
});
|
||||
|
||||
this.uploadProgress = this.forkObservable.length;
|
||||
this.cancelRequsts = forkJoin(this.forkObservable).subscribe((responses) => {
|
||||
this.uploadFileMessage = responses;
|
||||
@ -86,11 +87,11 @@ export class AddImageDialogComponent implements OnInit, DoCheck {
|
||||
|
||||
ngDoCheck() {
|
||||
setTimeout(() => {
|
||||
if (this.uploadProgress < 95) {
|
||||
if (this.uploadProgress < 100 - this.forkObservable.length) {
|
||||
this.uploadProgress = this.uploadProgress + 1;
|
||||
this.uploadServiceService.processBarCount(this.uploadProgress);
|
||||
}
|
||||
}, 10000);
|
||||
}, this.forkObservable.length * 10000);
|
||||
}
|
||||
cancelUploading() {
|
||||
this.cancelRequsts.unsubscribe();
|
||||
|
Loading…
Reference in New Issue
Block a user