diff --git a/public/app/percona/dbaas/components/DBCluster/EditDBClusterPage/EditDBClusterPage.tsx b/public/app/percona/dbaas/components/DBCluster/EditDBClusterPage/EditDBClusterPage.tsx index 53fe841d65253..71203b26d33b4 100644 --- a/public/app/percona/dbaas/components/DBCluster/EditDBClusterPage/EditDBClusterPage.tsx +++ b/public/app/percona/dbaas/components/DBCluster/EditDBClusterPage/EditDBClusterPage.tsx @@ -11,7 +11,6 @@ import { useShowPMMAddressWarning } from 'app/percona/shared/components/hooks/sh import { useSelector, useDispatch } from 'app/types'; import { FeatureLoader } from '../../../../shared/components/Elements/FeatureLoader'; -import { Databases } from '../../../../shared/core'; import { fetchStorageLocations } from '../../../../shared/core/reducers/backups/backupLocations'; import { resetAddDBClusterState } from '../../../../shared/core/reducers/dbaas/addDBCluster/addDBCluster'; import { resetDBCluster } from '../../../../shared/core/reducers/dbaas/dbaas'; @@ -119,20 +118,17 @@ export const EditDBClusterPage: FC = () => {
{mode === 'create' && }
- {!!settings?.backupEnabled && - form.getState().values.databaseType.value !== Databases.postgresql && } + {!!settings?.backupEnabled && } - {!!settings?.backupEnabled && - mode === 'create' && - form.getState().values.databaseType.value !== Databases.postgresql && ( - - )} + {!!settings?.backupEnabled && mode === 'create' && ( + + )}
({ disk_size: dbCluster.disk * BILLION, }, - // ...(dbCluster.backup && { - // backup: { - // location_id: dbCluster.backup?.locationId, - // keep_copies: dbCluster.backup?.keepCopies, - // cron_expression: dbCluster.backup?.cronExpression, - // service_account: dbCluster.backup?.serviceAccount, - // }, - // }), - // ...(dbCluster.restore && { - // restore: { - // location_id: dbCluster.restore?.locationId, - // destination: dbCluster.restore?.destination, - // secrets_name: dbCluster.restore?.secretsName, - // }, - // }), + ...(dbCluster.backup && { + backup: { + location_id: dbCluster.backup?.locationId, + keep_copies: dbCluster.backup?.keepCopies, + cron_expression: dbCluster.backup?.cronExpression, + service_account: dbCluster.backup?.serviceAccount, + }, + }), + ...(dbCluster.restore && { + restore: { + location_id: dbCluster.restore?.locationId, + destination: dbCluster.restore?.destination, + secrets_name: dbCluster.restore?.secretsName, + }, + }), }, // ...(dbCluster.template && { // template: {