- if (window.confirm('Are you sure you want to deploy?')) {
- event.confirm.resolve();
- } else {
- event.confirm.reject();
- }
- }
+ this.confirmDialogService.openConfirmDialog('Are you sure you want to deploy this xApp?')
+ .afterClosed().subscribe(res => {
+ if (res) {
+ this.service.deployXapp(event.data.name).subscribe(
+ response => {
+ switch (response.status) {
+ case 200:
+ this.notification.success('xApp deploy succeeded!');
+ break;
+ default:
+ this.notification.warn('xApp deploy failed.');
+ }
+ }
+ );
+ }
+ });