- this.dataSource = new ControlDataSource(this.xappMgrSvc, this.sort);
- this.dataSource.loadTable();
- }
-
- controlApp(app: XappControlRow): void {
- const acXappPattern = /[Aa][Dd][Mm][Ii][Ss]{2}[Ii][Oo][Nn]/;
- const anrXappPattern = /[Aa][Nn][Rr]/;
- if (acXappPattern.test(app.xapp)) {
- this.router.navigate(['/ac']);
- } else if (anrXappPattern.test(app.xapp)) {
- this.router.navigate(['/anr']);
- } else {
- this.errorDialogService.displayError('No control available for ' + app.xapp + ' (yet)');
- }
- }
-
- undeployApp(app: XappControlRow): void {
- this.confirmDialogService.openConfirmDialog('Are you sure you want to undeploy xApp ' + app.xapp + '?')
- .afterClosed().subscribe(res => {
- if (res) {
- this.xappMgrSvc.undeployXapp(app.xapp).subscribe(
- response => {
- this.dataSource.loadTable();
- switch (response.status) {
- case 200:
- this.notification.success('xApp undeployed successfully!');
- break;
- default:
- this.notification.warn('xApp undeploy failed.');
- }
- }
- );
- }
- });