-
- onxAppControlAction(event) {
- switch (event.action) {
- case 'view':
- this.view(event);
- break;
- case 'undeploy':
- this.undeploy(event);
- break;
- }
- }
-
- view(event): void {
- 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.service.undeployxApp(event.data.xapp).subscribe(
- response => {
- this.service.getxAppInstances((instances) => { this.source.load(instances); });
- switch (response.status) {
- case 200:
- this.notification.success('xApp undeployed successfully!');
- break;
- default:
- this.notification.warn('xApp undeploy failed.');
- }
- }
- );
- }
- });
- }
-
-