New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1988905: External mode deployments fails on parsing json in ODF wizard #9966
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import * as React from 'react'; | ||
import * as _ from 'lodash'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { TextContent, Text, TextVariants, List, ListItem } from '@patternfly/react-core'; | ||
import { useFlag } from '@console/shared/src'; | ||
|
@@ -25,7 +26,7 @@ export const ReviewItem = ({ children, title }) => ( | |
</div> | ||
); | ||
|
||
export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({ state }) => { | ||
export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({ state, hasOCS }) => { | ||
const { t } = useTranslation(); | ||
const isMultusSupported = useFlag(GUARDED_FEATURES.OCS_MULTUS); | ||
|
||
|
@@ -35,13 +36,17 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({ state }) => { | |
securityAndNetwork, | ||
createLocalVolumeSet, | ||
backingStorage, | ||
connectionDetails, | ||
createStorageClass, | ||
nodes, | ||
} = state; | ||
const { capacity, arbiterLocation, enableArbiter } = capacityAndNodes; | ||
const { encryption, kms, networkType } = securityAndNetwork; | ||
const { deployment, externalStorage, type } = backingStorage; | ||
|
||
const isMCG = deployment === DeploymentType.MCG; | ||
const isRhcs = !_.isEmpty(connectionDetails); | ||
const isStandaloneExternal = hasOCS && !_.isEmpty(createStorageClass); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One doubt... we also have already set flags to check whether it is external cluster or not, will that not work here ?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If independent mode is true then we can say its rhcs but if its false we cannot say -
Also in future we will have many storage systems, so keeping this way, would not complicate |
||
|
||
const isNoProvisioner = storageClass.provisioner === NO_PROVISIONER; | ||
const formattedCapacity = !isNoProvisioner | ||
|
@@ -65,7 +70,7 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({ state }) => { | |
return ( | ||
<> | ||
<ReviewItem title={t('ceph-storage-plugin~Backing storage')}> | ||
{!isMCG && ( | ||
{!isMCG && !isRhcs && ( | ||
<ListItem> | ||
{t('ceph-storage-plugin~StorageClass: {{name}}', { | ||
name: storageClass.name || createLocalVolumeSet.volumeSetName, | ||
|
@@ -85,7 +90,7 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({ state }) => { | |
</ListItem> | ||
)} | ||
</ReviewItem> | ||
{!isMCG && ( | ||
{!isMCG && !isRhcs && !isStandaloneExternal && ( | ||
<ReviewItem title={t('ceph-storage-plugin~Capacity and nodes')}> | ||
<ListItem> | ||
{t('ceph-storage-plugin~Cluster capacity: {{capacity}}', { | ||
|
@@ -119,39 +124,42 @@ export const ReviewAndCreate: React.FC<ReviewAndCreateProps> = ({ state }) => { | |
)} | ||
</ReviewItem> | ||
)} | ||
{isMCG ? ( | ||
<ReviewItem title={t('ceph-storage-plugin~Security')}> | ||
<ListItem>{t('ceph-storage-plugin~Encryption: Enabled')}</ListItem> | ||
<ListItem> | ||
{t('ceph-storage-plugin~External key management service: {{kmsStatus}}', { | ||
kmsStatus, | ||
})} | ||
</ListItem> | ||
</ReviewItem> | ||
) : ( | ||
<ReviewItem title={t('ceph-storage-plugin~Security and network')}> | ||
<ListItem> | ||
{t('ceph-storage-plugin~Encryption: {{encryptionStatus}}', { encryptionStatus })} | ||
</ListItem> | ||
{hasEncryption && ( | ||
{!isRhcs && | ||
!isStandaloneExternal && | ||
(isMCG ? ( | ||
<ReviewItem title={t('ceph-storage-plugin~Security')}> | ||
<ListItem>{t('ceph-storage-plugin~Encryption: Enabled')}</ListItem> | ||
<ListItem> | ||
{t('ceph-storage-plugin~External key management service: {{kmsStatus}}', { | ||
kmsStatus, | ||
})} | ||
</ListItem> | ||
)} | ||
{isMultusSupported && ( | ||
</ReviewItem> | ||
) : ( | ||
<ReviewItem title={t('ceph-storage-plugin~Security and network')}> | ||
<ListItem> | ||
{t('ceph-storage-plugin~Network: {{networkType}}', { | ||
networkType: NetworkTypeLabels[networkType], | ||
})} | ||
{t('ceph-storage-plugin~Encryption: {{encryptionStatus}}', { encryptionStatus })} | ||
</ListItem> | ||
)} | ||
</ReviewItem> | ||
)} | ||
{hasEncryption && ( | ||
<ListItem> | ||
{t('ceph-storage-plugin~External key management service: {{kmsStatus}}', { | ||
kmsStatus, | ||
})} | ||
</ListItem> | ||
)} | ||
{isMultusSupported && ( | ||
<ListItem> | ||
{t('ceph-storage-plugin~Network: {{networkType}}', { | ||
networkType: NetworkTypeLabels[networkType], | ||
})} | ||
</ListItem> | ||
)} | ||
</ReviewItem> | ||
))} | ||
</> | ||
); | ||
}; | ||
type ReviewAndCreateProps = { | ||
state: WizardState; | ||
hasOCS: boolean; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ | |
} | ||
|
||
.odf-connection-details__helper-text { | ||
padding-top: 0.2rem; | ||
padding-top: var(--pf-global--spacer--xs); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add this to constants file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its just used here. lets keep it.