X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fran-control%2Fran-control.component.ts;h=af7709d8ee2fdb8dfe3f54d678b7780f5738c93a;hb=7845281a4bdb97925cba281f133ef058f15a1f95;hp=26665ca6b78abbf86d770dd59db6ff4a6ce6a096;hpb=fa50e55b6e8977ad0a6a28096fe58fb54924ca2b;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/ran-control/ran-control.component.ts b/webapp-frontend/src/app/ran-control/ran-control.component.ts index 26665ca6..af7709d8 100644 --- a/webapp-frontend/src/app/ran-control/ran-control.component.ts +++ b/webapp-frontend/src/app/ran-control/ran-control.component.ts @@ -63,16 +63,19 @@ export class RanControlComponent implements OnInit { this.confirmDialogService.openConfirmDialog('Are you sure you want to disconnect all RAN connections?') .afterClosed().subscribe( (res: boolean) => { if (res) { - this.e2MgrSvc.nodebDelete().subscribe( - ( response: HttpResponse) => { - if (response.status === 200) { - this.notificationService.success('Disconnect all RAN Connections Succeeded!'); - this.dataSource.loadTable(); - } + this.e2MgrSvc.nodebPut().subscribe( + ( body: any ) => { + this.notificationService.success('Disconnect succeeded!'); + this.dataSource.loadTable(); }, - ( (error: HttpErrorResponse) => { - this.errorDialogService.displayError(aboutError + error.message); - }) + (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); + } ); } });