in frontend/src/app/modules/data-transfer-manager/components/data-transfer-manager/data-transfer-manager.component.ts [126:153]
startRestore(db_id: number) {
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
data: <DialogData>{
message: `By confirming this action, you start the restore process.
Keep in mind that in order to maintain data consistency after switching over, the ability to update your current database should be turned off.
Please, don't forget to switch over after the restore is completed.`,
AcceptCtaText: true,
CancelCtaText: false,
acceptBtnText: 'Start',
cancelBtnText: 'Cancel',
headerText: 'Start Restore?'
},
width: '550px',
role: 'alertdialog',
panelClass: 'custom-dialog'
});
dialogRef.afterClosed().subscribe(result => {
if(result === true) {
this.dataTransferService.startRestore(db_id).subscribe(() => {
this.getTransferMappings();
},
(error) => {
this.openSnackBar(error);
});
}
});
}