Port Backup Global, Backup Server, and Backup object dialog in React. Fixes #6984

This commit is contained in:
Nikhil Mohite authored and Akshay Joshi committed 2021-11-22 11:20:44 +05:30
1 parent a701e8c766
commit 3afeb8ca46
30 files changed
+1157 -2271

No files matched your search

+2 -1
View File
@@ -706,7 +706,7 @@ function SchemaDialogView({
{gettext('Reset')}
</DefaultButton>
<PrimaryButton data-test="Save" onClick={onSaveClick} startIcon={<SaveIcon />} disabled={!dirty || saving || Boolean(formErr.name) || !formReady}>
{gettext('Save')}
{props.customSaveBtnName ? gettext(props.customSaveBtnName) : gettext('Save')}
</PrimaryButton>
</Box>
</Box>}
@@ -739,6 +739,7 @@ SchemaDialogView.propTypes = {
disableDialogHelp: PropTypes.bool,
showFooter: PropTypes.bool,
resetKey: PropTypes.any,
customSaveBtnName: PropTypes.string,
};
const usePropsStyles = makeStyles((theme)=>({
@@ -7,7 +7,6 @@
//
//////////////////////////////////////////////////////////////
import * as BackupDialog from '../../../tools/backup/static/js/backup_dialog_wrapper';
import {RestoreDialogWrapper} from '../../../tools/restore/static/js/restore_dialog_wrapper';
import SearchObjectsDialogWrapper from '../../../tools/search_objects/static/js/search_objects_dialog_wrapper';
@@ -28,8 +27,6 @@ export class DialogFactory {
return this.createRestoreDialog(dialogTitle, typeOfDialog);
} else if (typeOfDialog === 'search_objects') {
return this.createSearchObjectsDialog(dialogTitle, typeOfDialog);
} else {
return this.createBackupDialog(dialogTitle, typeOfDialog);
}
}
@@ -43,16 +40,6 @@ export class DialogFactory {
this.backform);
}
createBackupDialog(dialogTitle, typeOfDialog) {
return new BackupDialog.BackupDialogWrapper(
this.dialogContainerSelector, dialogTitle, typeOfDialog,
this.jquery,
this.pgBrowser,
this.alertify,
this.dialogModel,
this.backform);
}
createSearchObjectsDialog(dialogTitle, typeOfDialog) {
return new SearchObjectsDialogWrapper(
this.dialogContainerSelector, dialogTitle, typeOfDialog,