Skip to content

Commit 92f0f30

Browse files
committed
[Revert][PLAT-17598] - [Edit Universe]Geo partitioning - Add a Geo partition First time - [PLAT-17599][Edit Universe]Geo partitioning - Second time & Delete Geo partition
Summary: Reverting this commit , since the backend changes are not landed yet. Test Plan: Tested manually Reviewers: rmadhavan Reviewed By: rmadhavan Differential Revision: https://phorge.dev.yugabyte.com/D47489
1 parent a70368a commit 92f0f30

34 files changed

+590
-1372
lines changed

managed/ui/src/redesign/assets/pin.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

managed/ui/src/redesign/features-v2/universe/create-universe/CreateUniverse.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const { Grid2: Grid, Typography } = mui;
3535

3636
const CreateUniverseRoot = styled('div')(() => ({
3737
'& .full-height-container': {
38-
backgroundColor: '#fff !important'
38+
backgroundColor: '#fff !important',
3939
}
4040
}));
4141

@@ -75,7 +75,7 @@ export const CreateUniverse = () => {
7575
</Grid>
7676
<Grid container spacing={2}>
7777
<Grid sx={{ borderRight: '1px solid #E9EEF2', height: '100vh' }}>
78-
<YBMultiLevelStepper dataTestId="stepper" activeStep={activeStep} steps={steps} />
78+
<YBMultiLevelStepper dataTestId='stepper' activeStep={activeStep} steps={steps} />
7979
</Grid>
8080
<Grid
8181
container
@@ -95,11 +95,7 @@ export const CreateUniverse = () => {
9595
direction="row"
9696
sx={{ marginTop: '32px' }}
9797
>
98-
<YBButton
99-
variant="secondary"
100-
size="large"
101-
dataTestId="create-universe-cancel-button"
102-
>
98+
<YBButton variant="secondary" size="large" dataTestId="create-universe-cancel-button">
10399
{t('cancel', { keyPrefix: 'common' })}
104100
</YBButton>
105101
<Grid container alignItems="center" justifyContent="flex-end" spacing={2}>

managed/ui/src/redesign/features-v2/universe/create-universe/CreateUniverseContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ export type CreateUniverseContextMethods = [
173173
ReturnType<typeof createUniverseFormMethods>
174174
];
175175

176-
// Navigate between pages
176+
// Navigate berween pages
177177
export type StepsRef = {
178-
onNext: () => Promise<void>;
178+
onNext: () => void;
179179
onPrev: () => void;
180180
};

managed/ui/src/redesign/features-v2/universe/create-universe/CreateUniverseUtils.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ import {
99
} from './steps/resilence-regions/dtos';
1010
import { AvailabilityZone, ClusterType, Region } from '../../../helpers/dtos';
1111
import { OtherAdvancedProps } from './steps/advanced-settings/dtos';
12-
import {
13-
ClusterNodeSpec,
14-
CommunicationPortsSpec,
15-
PlacementRegion,
16-
UniverseCreateReqBody
17-
} from '../../../../v2/api/yugabyteDBAnywhereV2APIs.schemas';
12+
import { ClusterNodeSpec, CommunicationPortsSpec, PlacementRegion, UniverseCreateReqBody } from '../../../../v2/api/yugabyteDBAnywhereV2APIs.schemas';
1813
import { CloudType, DeviceInfo } from '@app/redesign/features/universe/universe-form/utils/dto';
1914

2015
export function getCreateUniverseSteps(t: TFunction, resilienceType?: ResilienceType) {
@@ -35,10 +30,10 @@ export function getCreateUniverseSteps(t: TFunction, resilienceType?: Resilience
3530
},
3631
...(resilienceType === ResilienceType.REGULAR
3732
? [
38-
{
39-
title: t('nodesAndAvailabilityZone')
40-
}
41-
]
33+
{
34+
title: t('nodesAndAvailabilityZone')
35+
}
36+
]
4237
: [])
4338
]
4439
},
@@ -159,8 +154,8 @@ export const assignRegionsAZNodeByReplicationFactor = (
159154
faultToleranceType === FaultToleranceType.AZ_LEVEL
160155
? getFaultToleranceNeededForAZ(replicationFactor)
161156
: faultToleranceType === FaultToleranceType.NODE_LEVEL
162-
? 1
163-
: getFaultToleranceNeeded(replicationFactor);
157+
? 1
158+
: getFaultToleranceNeeded(replicationFactor);
164159

165160
values(regions).forEach((region, index) => {
166161
const nodeCount = getNodeCountForRegion(faultToleranceNeeded, regions.length, index);

managed/ui/src/redesign/features-v2/universe/create-universe/SwitchCreateUniverseSteps.tsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ import { ResilienceType } from './steps/resilence-regions/dtos';
3636
* @param currentComponentRef - The ref to the current component
3737
* @returns The steps mappings
3838
*/
39-
function getStepsMappings(
40-
resilieceType: ResilienceType,
41-
currentComponentRef: React.RefObject<StepsRef>
42-
) {
39+
function getStepsMappings(resilieceType: ResilienceType, currentComponentRef: React.RefObject<StepsRef>) {
4340
// If the resilience type is single node, we need to adjust the steps by 1
4441
// because the single node does not have the nodes availability step
4542
const adjust = resilieceType === ResilienceType.SINGLE_NODE ? 1 : 0;
@@ -52,15 +49,11 @@ function getStepsMappings(
5249
[CreateUniverseSteps.DATABASE - adjust]: <DatabaseSettings ref={currentComponentRef} />,
5350
[CreateUniverseSteps.SECURITY - adjust]: <SecuritySettings ref={currentComponentRef} />,
5451
[CreateUniverseSteps.ADVANCED_PROXY - adjust]: <ProxySettings ref={currentComponentRef} />,
55-
[CreateUniverseSteps.ADVANCED_OTHER - adjust]: (
56-
<OtherAdvancedSettings ref={currentComponentRef} />
57-
),
52+
[CreateUniverseSteps.ADVANCED_OTHER - adjust]: <OtherAdvancedSettings ref={currentComponentRef} />,
5853
[CreateUniverseSteps.REVIEW - adjust]: <ReviewAndSummary ref={currentComponentRef} />
5954
};
6055
if (adjust === 0) {
61-
mappings[CreateUniverseSteps.NODES_AVAILABILITY] = (
62-
<NodesAvailability ref={currentComponentRef} />
63-
);
56+
mappings[CreateUniverseSteps.NODES_AVAILABILITY] = <NodesAvailability ref={currentComponentRef} />;
6457
}
6558
return mappings;
6659
}
@@ -71,9 +64,7 @@ const SwitchCreateUniverseSteps = forwardRef((_props, forwardRef) => {
7164
) as unknown) as CreateUniverseContextMethods;
7265

7366
const currentComponentRef = useRef<StepsRef>(null);
74-
const [, { get, setAll }] = useMap<Record<number, JSX.Element>>(
75-
getStepsMappings(resilienceType!, currentComponentRef)
76-
);
67+
const [, { get, setAll }] = useMap<Record<number, JSX.Element>>(getStepsMappings(resilienceType!, currentComponentRef));
7768
useImperativeHandle(forwardRef, () => currentComponentRef.current, [
7869
currentComponentRef.current,
7970
activeStep
@@ -89,7 +80,7 @@ const SwitchCreateUniverseSteps = forwardRef((_props, forwardRef) => {
8980

9081
useEffect(() => {
9182
if (activeStep === CreateUniverseSteps.RESILIENCE_AND_REGIONS) {
92-
setAll(getStepsMappings(resilienceType!, currentComponentRef));
83+
setAll(getStepsMappings(resilienceType!, currentComponentRef));
9384
}
9485
}, [resilienceType, activeStep]);
9586

managed/ui/src/redesign/features-v2/universe/create-universe/components/UniverseActionButtons.tsx

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { FC } from 'react';
2-
import { yba, mui } from '@yugabyte-ui-library/core';
3-
import { useTranslation } from 'react-i18next';
1+
import { FC } from "react";
2+
import { yba, mui } from "@yugabyte-ui-library/core";
3+
import { useTranslation } from "react-i18next";
44

55
const { YBButton } = yba;
66

@@ -22,25 +22,20 @@ interface UniverseActionButtonsProps {
2222
onClick: () => void;
2323
disabled?: boolean;
2424
};
25-
additionalButtons?: React.ReactElement;
25+
additionalButtons? : React.ReactElement
2626
}
2727

28-
export const UniverseActionButtons: FC<UniverseActionButtonsProps> = ({
29-
cancelButton,
30-
nextButton,
31-
prevButton,
32-
additionalButtons
33-
}) => {
28+
export const UniverseActionButtons: FC<UniverseActionButtonsProps> = ({ cancelButton, nextButton, prevButton, additionalButtons }) => {
3429
const { t } = useTranslation('translation', { keyPrefix: 'common' });
3530

3631
return (
37-
<Grid container alignItems="center" justifyContent="space-between" direction="row">
38-
<YBButton
39-
variant="secondary"
40-
size="large"
41-
dataTestId="create-universe-cancel-button"
42-
onClick={cancelButton?.onClick}
43-
>
32+
<Grid
33+
container
34+
alignItems="center"
35+
justifyContent="space-between"
36+
direction="row"
37+
>
38+
<YBButton variant="secondary" size="large" dataTestId="create-universe-cancel-button" onClick={cancelButton?.onClick}>
4439
{cancelButton?.text ?? t('cancel')}
4540
</YBButton>
4641
<Grid container alignItems="center" justifyContent="flex-end" spacing={2}>

managed/ui/src/redesign/features-v2/universe/create-universe/fields/accesskey-field/AccessKeyField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const AccessKeyField: FC<AccessKeyFieldProps> = ({ disabled, provider })
4343
control={control}
4444
disabled={disabled}
4545
label={t('createUniverseV2.otherAdvancedSettings.accessKeyLabel')}
46-
dataTestId="access-key-select"
46+
dataTestId='access-key-select'
4747
>
4848
{allAccessKeys.map((item: AccessKey) => (
4949
<MenuItem key={item.idKey.keyCode} value={item.idKey.keyCode}>

managed/ui/src/redesign/features-v2/universe/create-universe/fields/encryption-in-transit/EITField.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,7 @@ const CERTComponent: FC<CertCompProps> = ({
6565

6666
return (
6767
<FieldContainer sx={{ padding: '16px 24px' }}>
68-
<YBToggleField
69-
control={control}
70-
name={toggleFieldPath}
71-
label={t(toggleFieldPath)}
72-
dataTestId={`enable-encryption-in-transit-field`}
73-
/>
68+
<YBToggleField control={control} name={toggleFieldPath} label={t(toggleFieldPath)} dataTestId={`enable-encryption-in-transit-field`} />
7469
{isOptionEnabled && (
7570
<Box sx={{ display: 'flex', flexDirection: 'row', width: '100%', mt: 4, gap: '16px' }}>
7671
<Box sx={{ mt: 4 }}>

0 commit comments

Comments
 (0)