- const url = '/xapp';
- this.router.navigate([url, event]).then( (e) => {
- if (e) {
- console.log(event.data);
- console.log('Navigation is successful!');
- } else {
- console.log('Navigation has failed!');
+ const url = '/xapp';
+ this.router.navigate([url, event]);
+ }
+
+ undeploy(event): void {
+ this.confirmDialogService.openConfirmDialog('Are you sure you want to undeploy this xApp ?')
+ .afterClosed().subscribe(res => {
+ if (res) {
+ this.xappMgrSvc.undeployXapp(event.data.xapp).subscribe(
+ response => {
+ this.xappMgrSvc.getAll().subscribe((xapps: XMXapp[]) => this.source.load(this.getInstance(xapps)));
+ switch (response.status) {
+ case 200:
+ this.notification.success('xApp undeployed successfully!');
+ break;
+ default:
+ this.notification.warn('xApp undeploy failed.');
+ }