|
1 | 1 | import React from 'react';
|
2 | 2 | import { useFormikContext } from 'formik';
|
3 | 3 | import { useSelector } from 'react-redux';
|
4 |
| -import { Grid, Tooltip } from '@patternfly/react-core'; |
| 4 | +import { Stack, StackItem, Tooltip } from '@patternfly/react-core'; |
5 | 5 | import { VirtualIPControlGroup, VirtualIPControlGroupProps } from './VirtualIPControlGroup';
|
6 | 6 | import {
|
7 | 7 | canBeDualStack,
|
@@ -241,71 +241,87 @@ const NetworkConfiguration = ({
|
241 | 241 | }, [featureSupportLevelContext]);
|
242 | 242 |
|
243 | 243 | return (
|
244 |
| - <Grid hasGutter> |
245 |
| - <ManagedNetworkingControlGroup |
246 |
| - disabled={isViewerMode || managedNetworkingState.isDisabled} |
247 |
| - tooltipCmnDisabled={managedNetworkingState.clusterManagedDisabledReason} |
248 |
| - tooltipUmnDisabled={managedNetworkingState.userManagedDisabledReason} |
249 |
| - /> |
| 244 | + <Stack hasGutter> |
| 245 | + <StackItem> |
| 246 | + <ManagedNetworkingControlGroup |
| 247 | + disabled={isViewerMode || managedNetworkingState.isDisabled} |
| 248 | + tooltipCmnDisabled={managedNetworkingState.clusterManagedDisabledReason} |
| 249 | + tooltipUmnDisabled={managedNetworkingState.userManagedDisabledReason} |
| 250 | + /> |
| 251 | + </StackItem> |
250 | 252 |
|
251 | 253 | {isUserManagedNetworking && (
|
252 |
| - <UserManagedNetworkingTextContent |
253 |
| - shouldDisplayLoadBalancersBullet={!isSNOCluster} |
254 |
| - docVersion={cluster.openshiftVersion} |
255 |
| - /> |
| 254 | + <StackItem> |
| 255 | + <UserManagedNetworkingTextContent |
| 256 | + shouldDisplayLoadBalancersBullet={!isSNOCluster} |
| 257 | + docVersion={cluster.openshiftVersion} |
| 258 | + /> |
| 259 | + </StackItem> |
256 | 260 | )}
|
257 | 261 |
|
258 | 262 | {(isSNOCluster || !isUserManagedNetworking) && (
|
259 |
| - <StackTypeControlGroup |
260 |
| - clusterId={cluster.id} |
261 |
| - isDualStackSelectable={isDualStackSelectable} |
262 |
| - hostSubnets={hostSubnets} |
263 |
| - /> |
| 263 | + <StackItem> |
| 264 | + <StackTypeControlGroup |
| 265 | + clusterId={cluster.id} |
| 266 | + isDualStackSelectable={isDualStackSelectable} |
| 267 | + hostSubnets={hostSubnets} |
| 268 | + /> |
| 269 | + </StackItem> |
264 | 270 | )}
|
265 | 271 | {isSDNSupported && (
|
266 |
| - <NetworkTypeControlGroup isDisabled={isViewerMode} isSDNSelectable={isSDNSelectable} /> |
| 272 | + <StackItem> |
| 273 | + <NetworkTypeControlGroup isDisabled={isViewerMode} isSDNSelectable={isSDNSelectable} /> |
| 274 | + </StackItem> |
267 | 275 | )}
|
268 | 276 |
|
269 | 277 | {!(isUserManagedNetworking && !isSNOCluster) && (
|
270 |
| - <AvailableSubnetsControl |
271 |
| - clusterId={cluster.id} |
272 |
| - hostSubnets={hostSubnets} |
273 |
| - isRequired={!isUserManagedNetworking} |
274 |
| - isDisabled={ |
275 |
| - (cluster.vipDhcpAllocation && |
276 |
| - selectApiVip(cluster) === '' && |
277 |
| - selectIngressVip(cluster) === '') || |
278 |
| - hostSubnets.length === 0 || |
279 |
| - false |
280 |
| - } |
281 |
| - /> |
| 278 | + <StackItem> |
| 279 | + <AvailableSubnetsControl |
| 280 | + clusterId={cluster.id} |
| 281 | + hostSubnets={hostSubnets} |
| 282 | + isRequired={!isUserManagedNetworking} |
| 283 | + isDisabled={ |
| 284 | + (cluster.vipDhcpAllocation && |
| 285 | + selectApiVip(cluster) === '' && |
| 286 | + selectIngressVip(cluster) === '') || |
| 287 | + hostSubnets.length === 0 || |
| 288 | + false |
| 289 | + } |
| 290 | + /> |
| 291 | + </StackItem> |
282 | 292 | )}
|
283 | 293 |
|
284 | 294 | {!isUserManagedNetworking && (
|
285 |
| - <VirtualIPControlGroup |
286 |
| - cluster={cluster} |
287 |
| - isVipDhcpAllocationDisabled={isVipDhcpAllocationDisabled || !isSDNSupported} |
288 |
| - supportLevel={featureSupportLevelContext.getFeatureSupportLevel('VIP_AUTO_ALLOC')} |
289 |
| - /> |
| 295 | + <StackItem> |
| 296 | + <VirtualIPControlGroup |
| 297 | + cluster={cluster} |
| 298 | + isVipDhcpAllocationDisabled={isVipDhcpAllocationDisabled || !isSDNSupported} |
| 299 | + supportLevel={featureSupportLevelContext.getFeatureSupportLevel('VIP_AUTO_ALLOC')} |
| 300 | + /> |
| 301 | + </StackItem> |
290 | 302 | )}
|
291 |
| - |
292 |
| - <Tooltip |
293 |
| - content={'Advanced networking properties must be configured in dual-stack'} |
294 |
| - hidden={!isDualStack} |
295 |
| - position={'top-start'} |
296 |
| - > |
297 |
| - <OcmCheckbox |
298 |
| - id="useAdvancedNetworking" |
299 |
| - label="Use advanced networking" |
300 |
| - description="Configure advanced networking properties (e.g. CIDR ranges)." |
301 |
| - isChecked={isAdvanced} |
302 |
| - onChange={(_event, value) => toggleAdvConfiguration(value)} |
303 |
| - isDisabled={isDualStack} |
304 |
| - /> |
305 |
| - </Tooltip> |
306 |
| - |
307 |
| - {isAdvanced && <AdvancedNetworkFields />} |
308 |
| - </Grid> |
| 303 | + <StackItem> |
| 304 | + <Tooltip |
| 305 | + content={'Advanced networking properties must be configured in dual-stack'} |
| 306 | + hidden={!isDualStack} |
| 307 | + position={'top-start'} |
| 308 | + > |
| 309 | + <OcmCheckbox |
| 310 | + id="useAdvancedNetworking" |
| 311 | + label="Use advanced networking" |
| 312 | + description="Configure advanced networking properties (e.g. CIDR ranges)." |
| 313 | + isChecked={isAdvanced} |
| 314 | + onChange={(_event, value) => toggleAdvConfiguration(value)} |
| 315 | + isDisabled={isDualStack} |
| 316 | + /> |
| 317 | + </Tooltip> |
| 318 | + </StackItem> |
| 319 | + {isAdvanced && ( |
| 320 | + <StackItem> |
| 321 | + <AdvancedNetworkFields /> |
| 322 | + </StackItem> |
| 323 | + )} |
| 324 | + </Stack> |
309 | 325 | );
|
310 | 326 | };
|
311 | 327 |
|
|
0 commit comments