startRollback()

in frontend/src/app/modules/data-transfer-manager/components/data-transfer-manager/data-transfer-manager.component.ts [182:207]


  startRollback(db_id: number) {
    const dialogRef = this.dialog.open(ConfirmDialogComponent, {
      data: <DialogData>{
        message: 'With this action, you are going to rollback this restore operation. Are you sure you want to proceed?',
        AcceptCtaText: true,
        CancelCtaText: false,
        acceptBtnText: 'Start',
        cancelBtnText: 'Cancel',
        headerText: 'Start Rollback?'
      },
      width: '550px',
      role: 'alertdialog',
      panelClass: 'custom-dialog'
    });

    dialogRef.afterClosed().subscribe(result => {
      if(result === true) {
        this.dataTransferService.startRollback(db_id).subscribe(() => {
          this.getTransferMappings();
        },
        (error) => {
          this.openSnackBar(error);
        });
      }
    });
  }