- this.e2MgrSvc.nodebDelete().subscribe(
- response => {
- if (response.status === 200) {
- this.notificationService.success('Disconnect all RAN Connections Succeeded!');
- this.dataSource.loadTable();
+ this.loadingDialogService.startLoading('Disconnecting');
+ this.e2MgrSvc.nodebPut(this.instanceKey)
+ .pipe(
+ finalize(() => this.loadingDialogService.stopLoading())
+ )
+ .subscribe(
+ (body: any) => {
+ this.notificationService.success('Disconnect succeeded!');
+ this.dataSource.loadTable(this.instanceKey);
+ },
+ (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.errorDialogService.displayError('Disconnect failed: ' + msg);