- this.appMgrService.deployXapp(app.name).subscribe(
- (response: HttpResponse<Object>) => {
- this.notificationService.success('App deploy succeeded!');
- },
- ( (her: HttpErrorResponse) => {
- // the error field should have an ErrorTransport object
- let msg = her.message;
- if (her.error && her.error.message) {
- msg = her.error.message;
- }
- this.notificationService.warn('App deploy failed: ' + msg);
- })
- );
+ this.loadingDialogService.startLoading('Deploying ' + app.name);
+ this.appMgrService.deployXapp(app.name)
+ .pipe(
+ finalize(() => this.loadingDialogService.stopLoading())
+ )
+ .subscribe(
+ (response: HttpResponse<Object>) => {
+ this.notificationService.success('App deploy succeeded!');
+ },
+ ((her: HttpErrorResponse) => {
+ // the error field should have an ErrorTransport object
+ let msg = her.message;
+ if (her.error && her.error.message) {
+ msg = her.error.message;
+ }
+ this.notificationService.warn('App deploy failed: ' + msg);
+ })
+ );