Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -119,20 +118,17 @@ export const EditDBClusterPage: FC<EditDBClusterPageProps> = () => {
<div className={styles.optionsWrapper}>
{mode === 'create' && <DBClusterBasicOptions kubernetes={kubernetes} form={form} />}
<div className={styles.switchOptionsWrapper}>
{!!settings?.backupEnabled &&
form.getState().values.databaseType.value !== Databases.postgresql && <Restore form={form} />}
{!!settings?.backupEnabled && <Restore form={form} />}
<NetworkAndSecurity form={form} />
{!!settings?.backupEnabled &&
mode === 'create' &&
form.getState().values.databaseType.value !== Databases.postgresql && (
<DBaaSBackups
handleSubmit={handleSubmit}
pristine={pristine}
valid={valid}
form={form}
{...props}
/>
)}
{!!settings?.backupEnabled && mode === 'create' && (
<DBaaSBackups
handleSubmit={handleSubmit}
pristine={pristine}
valid={valid}
form={form}
{...props}
/>
)}
</div>
<DBClusterAdvancedOptions
showUnsafeConfigurationWarning={showUnsafeConfigurationWarning}
Expand Down
30 changes: 15 additions & 15 deletions public/app/percona/dbaas/components/DBCluster/PG.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,21 @@ const toAPI = (dbCluster: DBCluster): DBClusterPayload => ({
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: {
Expand Down