Skip to content

Commit 9ee8ae6

Browse files
authored
Revert "[yugabyte#7024] Platform: Fixed edit number of nodes in AZ section (yugabyte#7029)" (yugabyte#7329)
Description: This reverts commit bccf91f. This commit was causing page crash while region selection during create universe.
1 parent 7e9c88f commit 9ee8ae6

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

managed/ui/src/components/universes/UniverseForm/AZSelectorTable.js

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default class AZSelectorTable extends Component {
113113
} = this.props;
114114
const universeTemplate = _.clone(universeConfigTemplate.data);
115115
const currentAZState = [...this.state.azItemState];
116-
const replicationFactor = currentPlacementStatus?.replicationFactor;
116+
const replicationFactor = currentPlacementStatus.replicationFactor;
117117
const item = currentAZState.find(item => item.value === zoneId);
118118
const originalValue = item.count;
119119
let totalNumNodes = 0;
@@ -403,24 +403,10 @@ export default class AZSelectorTable extends Component {
403403

404404
UNSAFE_componentWillMount() {
405405
const {
406-
universe: { currentUniverse, universeConfigTemplate, currentPlacementStatus},
406+
universe: { currentUniverse, universeConfigTemplate },
407407
type,
408408
clusterType
409409
} = this.props;
410-
411-
// If currentPlacementStatus is null the fetch it.
412-
if(!currentPlacementStatus) {
413-
const configTemplateCurrentCluster = isNonEmptyObject(universeConfigTemplate.data)
414-
? getClusterByType(universeConfigTemplate.data.clusters, clusterType)
415-
: null;
416-
const placementInfo = this.getGroupWithCounts(universeConfigTemplate.data);
417-
const placementStatusObject = {
418-
numUniqueRegions: placementInfo.uniqueRegions,
419-
numUniqueAzs: placementInfo.uniqueAzs,
420-
replicationFactor: configTemplateCurrentCluster.userIntent.replicationFactor
421-
};
422-
this.props.setPlacementStatus(placementStatusObject);
423-
}
424410
const currentCluster = getPromiseState(universeConfigTemplate).isSuccess()
425411
? getClusterByType(universeConfigTemplate.data.clusters, clusterType)
426412
: {};
@@ -448,7 +434,7 @@ export default class AZSelectorTable extends Component {
448434
const placementInfo = this.getGroupWithCounts(universeConfigTemplate.data);
449435
const azGroups = placementInfo.groups;
450436
if (
451-
!areUniverseConfigsEqual(
437+
!areUniverseConfigsEqual(
452438
this.props.universe.universeConfigTemplate.data,
453439
universeConfigTemplate.data
454440
)

managed/ui/src/components/universes/UniverseForm/ClusterFields.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ export default class ClusterFields extends Component {
15911591
<AZPlacementInfo
15921592
placementInfo={self.props.universe.currentPlacementStatus}
15931593
placementCloud={placementCloud}
1594-
providerCode={currentProvider?.code}
1594+
providerCode={currentProvider.code}
15951595
/>
15961596
);
15971597
} else if (currentProvider?.code === 'onprem'

0 commit comments

Comments
 (0)