@openshift-assisted/ui-lib 2.53.0 → 2.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.d.ts +0 -17
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.d.ts +19 -0
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.d.ts.map +1 -0
- package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.d.ts +2 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/ExternalPlatformsDropdown.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/ReviewValidations.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/validationsInfoUtils.d.ts +0 -1
- package/build/@types/common/components/clusterWizard/validationsInfoUtils.d.ts.map +1 -1
- package/build/@types/common/components/hosts/HostsTable.d.ts.map +1 -1
- package/build/@types/common/components/ui/WizardFooter.d.ts +0 -1
- package/build/@types/common/components/ui/WizardFooter.d.ts.map +1 -1
- package/build/@types/common/selectors/clusterSelectors.d.ts +0 -1
- package/build/@types/common/selectors/clusterSelectors.d.ts.map +1 -1
- package/build/@types/common/types/clusters.d.ts +2 -2
- package/build/@types/common/types/clusters.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageModal.d.ts +0 -1
- package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageModal.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.d.ts +4 -0
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OperatorCheckbox.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/bundleSpecs.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts +2 -2
- package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewSummary.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/TableSummaryExpandable.d.ts +1 -0
- package/build/@types/ocm/components/clusterConfiguration/review/TableSummaryExpandable.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContextProvider.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/HostDiscovery.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/NewClusterWizard.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts +3 -3
- package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OptionalOperatorsDropdown.d.ts +13 -0
- package/build/@types/ocm/components/clusterWizard/OptionalOperatorsDropdown.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +2 -3
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/ClustersListToolbar.d.ts +1 -2
- package/build/@types/ocm/components/clusters/ClustersListToolbar.d.ts.map +1 -1
- package/build/@types/ocm/components/hosts/HostsTableEmptyState.d.ts.map +1 -1
- package/build/@types/ocm/services/InfraEnvsService.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +2 -0
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.js +4 -2
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.js +5 -31
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.js +1 -11
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.js +41 -0
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.js.map +1 -0
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +1 -1
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js +9 -3
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/ExternalPlatformsDropdown.js +1 -1
- package/build/cjs/common/components/clusterConfiguration/ExternalPlatformsDropdown.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/ReviewValidations.js +16 -0
- package/build/cjs/common/components/clusterWizard/ReviewValidations.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +34 -19
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.js +3 -3
- package/build/cjs/common/components/clusterWizard/validationsInfoUtils.js +1 -17
- package/build/cjs/common/components/clusterWizard/validationsInfoUtils.js.map +1 -1
- package/build/cjs/common/components/hosts/HostsTable.js +1 -2
- package/build/cjs/common/components/hosts/HostsTable.js.map +1 -1
- package/build/cjs/common/components/ui/WizardFooter.js +1 -6
- package/build/cjs/common/components/ui/WizardFooter.js.map +1 -1
- package/build/cjs/common/selectors/clusterSelectors.js +2 -8
- package/build/cjs/common/selectors/clusterSelectors.js.map +1 -1
- package/build/cjs/common/types/clusters.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageForm.js +5 -2
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.js +2 -2
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +6 -2
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js +3 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.js +3 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.js +11 -8
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +5 -6
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js +33 -13
- package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/bundleSpecs.js +1 -2
- package/build/cjs/ocm/components/clusterConfiguration/operators/bundleSpecs.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js +3 -3
- package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js +75 -20
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js +2 -2
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/TableSummaryExpandable.css +3 -0
- package/build/cjs/ocm/components/clusterConfiguration/review/TableSummaryExpandable.js +2 -3
- package/build/cjs/ocm/components/clusterConfiguration/review/TableSummaryExpandable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.js +10 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.js +5 -5
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +2 -9
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js +4 -4
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js +1 -4
- package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js +6 -3
- package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/Operators.js +36 -8
- package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js +34 -15
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.test.js +11 -5
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.test.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OptionalOperatorsDropdown.js +34 -0
- package/build/cjs/ocm/components/clusterWizard/OptionalOperatorsDropdown.js.map +1 -0
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +67 -28
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClustersListToolbar.js +2 -2
- package/build/cjs/ocm/components/clusters/ClustersListToolbar.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClustersTable.js +1 -1
- package/build/cjs/ocm/components/clusters/ClustersTable.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +1 -1
- package/build/cjs/ocm/components/hosts/HostsTableEmptyState.js +1 -2
- package/build/cjs/ocm/components/hosts/HostsTableEmptyState.js.map +1 -1
- package/build/cjs/ocm/hooks/useInfraEnvId.js +2 -2
- package/build/cjs/ocm/hooks/useInfraEnvId.js.map +1 -1
- package/build/cjs/ocm/services/InfraEnvsService.js +4 -1
- package/build/cjs/ocm/services/InfraEnvsService.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.tsx +3 -1
- package/lib/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.tsx +5 -86
- package/lib/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.tsx +1 -12
- package/lib/cim/components/ClusterDeployment/clusterDetails/useDetailsFormik.tsx +97 -0
- package/lib/cim/components/common/CpuArchitectureDropdown.tsx +2 -1
- package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.tsx +18 -8
- package/lib/common/components/clusterConfiguration/ExternalPlatformsDropdown.tsx +3 -1
- package/lib/common/components/clusterWizard/ReviewValidations.tsx +24 -0
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +38 -12
- package/lib/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.tsx +3 -3
- package/lib/common/components/clusterWizard/validationsInfoUtils.ts +0 -20
- package/lib/common/components/hosts/HostsTable.tsx +0 -2
- package/lib/common/components/ui/WizardFooter.tsx +0 -10
- package/lib/common/selectors/clusterSelectors.ts +2 -9
- package/lib/common/types/clusters.ts +3 -1
- package/lib/ocm/components/clusterConfiguration/DiscoveryImageForm.tsx +11 -2
- package/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx +13 -3
- package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +9 -1
- package/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx +8 -1
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.tsx +3 -1
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.tsx +12 -6
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +7 -9
- package/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx +37 -17
- package/lib/ocm/components/clusterConfiguration/operators/bundleSpecs.tsx +2 -3
- package/lib/ocm/components/clusterConfiguration/operators/utils.tsx +5 -4
- package/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx +114 -24
- package/lib/ocm/components/clusterConfiguration/review/ReviewSummary.tsx +1 -4
- package/lib/ocm/components/clusterConfiguration/review/TableSummaryExpandable.css +3 -0
- package/lib/ocm/components/clusterConfiguration/review/TableSummaryExpandable.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/review/utils.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.tsx +10 -1
- package/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.tsx +9 -6
- package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +2 -14
- package/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +5 -13
- package/lib/ocm/components/clusterWizard/HostDiscovery.tsx +0 -4
- package/lib/ocm/components/clusterWizard/NewClusterWizard.tsx +7 -3
- package/lib/ocm/components/clusterWizard/Operators.tsx +45 -10
- package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +72 -26
- package/lib/ocm/components/clusterWizard/OperatorsSelect.test.ts +11 -5
- package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +1 -1
- package/lib/ocm/components/clusterWizard/OptionalOperatorsDropdown.tsx +106 -0
- package/lib/ocm/components/clusterWizard/wizardTransition.ts +90 -36
- package/lib/ocm/components/clusters/ClustersListToolbar.tsx +3 -5
- package/lib/ocm/components/clusters/ClustersTable.tsx +1 -1
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +1 -1
- package/lib/ocm/components/hosts/HostsTableEmptyState.tsx +0 -2
- package/lib/ocm/hooks/useInfraEnvId.ts +2 -2
- package/lib/ocm/services/InfraEnvsService.ts +4 -1
- package/package.json +11 -11
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.css +0 -3
- package/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.css +0 -3
|
@@ -39,7 +39,8 @@ export const selectMonitoredOperators = (monitoredOperators: Cluster['monitoredO
|
|
|
39
39
|
|
|
40
40
|
export const selectOlmOperators = (cluster?: Pick<Cluster, 'monitoredOperators'>) => {
|
|
41
41
|
return selectMonitoredOperators(cluster?.monitoredOperators).filter(
|
|
42
|
-
(operator) =>
|
|
42
|
+
(operator) =>
|
|
43
|
+
operator.operatorType === 'olm' && !!operator.name && operator.dependencyOnly !== true,
|
|
43
44
|
);
|
|
44
45
|
};
|
|
45
46
|
|
|
@@ -120,11 +121,3 @@ export const isClusterPlatformTypeVM = ({ platform }: Pick<Cluster, 'platform'>)
|
|
|
120
121
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
121
122
|
// @ts-ignore
|
|
122
123
|
SupportedPlatformIntegrations.includes(platform?.type ?? 'none');
|
|
123
|
-
|
|
124
|
-
export const numberOfEnabledOperators = (monitoredOperators: Cluster['monitoredOperators']) => {
|
|
125
|
-
return monitoredOperators
|
|
126
|
-
? selectMonitoredOperators(
|
|
127
|
-
monitoredOperators.filter((operator) => operator.operatorType === 'olm'),
|
|
128
|
-
).length
|
|
129
|
-
: 0;
|
|
130
|
-
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IRow } from '@patternfly/react-table';
|
|
2
2
|
import {
|
|
3
|
+
BundleCreateParams,
|
|
3
4
|
Cluster,
|
|
4
5
|
V2ClusterUpdateParams,
|
|
5
6
|
ClusterValidationId,
|
|
@@ -57,8 +58,9 @@ export type HostDiscoveryValues = V2ClusterUpdateParams & {
|
|
|
57
58
|
export type StorageValues = V2ClusterUpdateParams & {
|
|
58
59
|
nodeLabeling: string;
|
|
59
60
|
};
|
|
61
|
+
|
|
60
62
|
export type OperatorsValues = {
|
|
61
|
-
selectedBundles:
|
|
63
|
+
selectedBundles: BundleCreateParams[];
|
|
62
64
|
selectedOperators: string[];
|
|
63
65
|
};
|
|
64
66
|
|
|
@@ -19,6 +19,7 @@ import { mapClusterCpuArchToInfraEnvCpuArch } from '../../services/CpuArchitectu
|
|
|
19
19
|
import { usePullSecret } from '../../hooks';
|
|
20
20
|
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
21
21
|
import { isOciPlatformType } from '../utils';
|
|
22
|
+
import { ModalBody } from '@patternfly/react-core';
|
|
22
23
|
|
|
23
24
|
type DiscoveryImageFormProps = {
|
|
24
25
|
cluster: Cluster;
|
|
@@ -93,10 +94,18 @@ const DiscoveryImageForm = ({
|
|
|
93
94
|
};
|
|
94
95
|
|
|
95
96
|
if (infraEnvError) {
|
|
96
|
-
return
|
|
97
|
+
return (
|
|
98
|
+
<ModalBody style={{ height: '696px' }}>
|
|
99
|
+
<ErrorState />
|
|
100
|
+
</ModalBody>
|
|
101
|
+
);
|
|
97
102
|
}
|
|
98
103
|
if (!infraEnv) {
|
|
99
|
-
return
|
|
104
|
+
return (
|
|
105
|
+
<ModalBody style={{ height: '696px' }}>
|
|
106
|
+
<LoadingState />
|
|
107
|
+
</ModalBody>
|
|
108
|
+
);
|
|
100
109
|
}
|
|
101
110
|
return (
|
|
102
111
|
<OcmDiscoveryImageConfigForm
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
ButtonVariant,
|
|
5
|
+
Modal,
|
|
6
|
+
ModalBody,
|
|
7
|
+
ModalHeader,
|
|
8
|
+
ModalVariant,
|
|
9
|
+
} from '@patternfly/react-core';
|
|
3
10
|
import { pluralize } from 'humanize-plus';
|
|
4
11
|
import {
|
|
5
12
|
AI_CISCO_INTERSIGHT_TAG,
|
|
@@ -14,7 +21,6 @@ import { useModalDialogsContext } from '../hosts/ModalDialogsContext';
|
|
|
14
21
|
import useInfraEnvImageUrl from '../../hooks/useInfraEnvImageUrl';
|
|
15
22
|
import useInfraEnvIpxeImageUrl from '../../hooks/useInfraEnvIpxeImageUrl';
|
|
16
23
|
import DownloadIpxeScript from '../../../common/components/clusterConfiguration/DownloadIpxeScript';
|
|
17
|
-
import './DiscoveryImageModal.css';
|
|
18
24
|
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
19
25
|
import { ClustersService } from '../../services';
|
|
20
26
|
import { useDispatch } from 'react-redux';
|
|
@@ -115,7 +121,11 @@ export const DiscoveryImageModal = () => {
|
|
|
115
121
|
data-testid="discovery-modal-title"
|
|
116
122
|
title={`Add ${pluralize(+isSNOCluster, 'host')}`}
|
|
117
123
|
/>
|
|
118
|
-
{(isoDownloadError || ipxeDownloadError) &&
|
|
124
|
+
{(isoDownloadError || ipxeDownloadError) && (
|
|
125
|
+
<ModalBody>
|
|
126
|
+
<ErrorState />
|
|
127
|
+
</ModalBody>
|
|
128
|
+
)}
|
|
119
129
|
{isoDownloadUrl ? (
|
|
120
130
|
<DownloadIso
|
|
121
131
|
fileName={`discovery_image_${cluster.name || ''}.iso`}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Form } from '@patternfly/react-core';
|
|
4
3
|
import { useFormikContext } from 'formik';
|
|
@@ -40,6 +39,7 @@ import ControlPlaneNodesDropdown, {
|
|
|
40
39
|
DEFAULT_VALUE_CPN,
|
|
41
40
|
isCPNDropdownItemEnabled,
|
|
42
41
|
} from './ControlPlaneNodesDropdown';
|
|
42
|
+
import { isFeatureSupportedAndAvailable } from '../featureSupportLevels/featureStateUtils';
|
|
43
43
|
|
|
44
44
|
export type OcmClusterDetailsFormFieldsProps = {
|
|
45
45
|
cluster?: Cluster;
|
|
@@ -79,6 +79,13 @@ export const OcmClusterDetailsFormFields = ({
|
|
|
79
79
|
architectureData[values.cpuArchitecture as SupportedCpuArchitecture].label;
|
|
80
80
|
|
|
81
81
|
const featureSupportLevelContext = useNewFeatureSupportLevel();
|
|
82
|
+
const tnaSupport = featureSupportLevelContext.getFeatureSupportLevel(
|
|
83
|
+
'TNA',
|
|
84
|
+
featureSupportLevelData ?? undefined,
|
|
85
|
+
);
|
|
86
|
+
const isArbiterEncryptionAvailable = isSingleClusterFeatureEnabled
|
|
87
|
+
? false
|
|
88
|
+
: isFeatureSupportedAndAvailable(tnaSupport);
|
|
82
89
|
|
|
83
90
|
React.useEffect(() => {
|
|
84
91
|
nameInputRef.current?.focus();
|
|
@@ -223,6 +230,7 @@ export const OcmClusterDetailsFormFields = ({
|
|
|
223
230
|
values={values}
|
|
224
231
|
isDisabled={cluster?.pullSecretSet}
|
|
225
232
|
isSNO={values.controlPlaneCount === 1}
|
|
233
|
+
isArbiterEncryptionAvailable={isArbiterEncryptionAvailable}
|
|
226
234
|
docVersion={openshiftVersion}
|
|
227
235
|
/>
|
|
228
236
|
</Form>
|
|
@@ -145,7 +145,7 @@ export const OcmDiscoveryImageConfigForm = ({
|
|
|
145
145
|
{({ submitForm, isSubmitting, status, setStatus }) => {
|
|
146
146
|
return (
|
|
147
147
|
<>
|
|
148
|
-
<ModalBody>
|
|
148
|
+
<ModalBody style={{ maxHeight: '611px' }}>
|
|
149
149
|
<Stack hasGutter>
|
|
150
150
|
<StackItem>
|
|
151
151
|
<Alert variant={AlertVariant.info} isInline title={alertDiscoveryText} />
|
package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx
CHANGED
|
@@ -22,6 +22,7 @@ import { getFieldId } from '../../../../common/components/ui/formik';
|
|
|
22
22
|
import { isOciPlatformType } from '../../utils';
|
|
23
23
|
import DeleteCustomManifestModal from './DeleteCustomManifestModal';
|
|
24
24
|
import { ClustersService } from '../../../services';
|
|
25
|
+
import { userProvidedManifests } from './components/utils';
|
|
25
26
|
import { useClusterWizardContext } from '../../clusterWizard/ClusterWizardContext';
|
|
26
27
|
|
|
27
28
|
export const CustomManifestsPage = ({
|
|
@@ -77,7 +78,13 @@ export const CustomManifestsPage = ({
|
|
|
77
78
|
const cleanCustomManifests = React.useCallback(async () => {
|
|
78
79
|
if (!clusterWizardContext.uiSettings?.customManifestsAdded || !cluster.id) return;
|
|
79
80
|
const { data: manifests } = await ClustersAPI.getManifests(cluster.id);
|
|
80
|
-
|
|
81
|
+
const manifestsToRemove = userProvidedManifests(manifests).map((manifest) => ({
|
|
82
|
+
...manifest,
|
|
83
|
+
folder: manifest.folder || 'manifests',
|
|
84
|
+
fileName: manifest.fileName || '',
|
|
85
|
+
yamlContent: '',
|
|
86
|
+
}));
|
|
87
|
+
await ClustersService.removeClusterManifests(manifestsToRemove, cluster.id);
|
|
81
88
|
setUseCustomManifests(false);
|
|
82
89
|
setDeleteModalOpen(false);
|
|
83
90
|
await clusterWizardContext.updateUISettings({
|
|
@@ -23,6 +23,7 @@ import { CustomManifestValues, ManifestFormData } from '../data/dataTypes';
|
|
|
23
23
|
import useClusterCustomManifests from '../../../../hooks/useClusterCustomManifests';
|
|
24
24
|
import { ClustersService } from '../../../../services';
|
|
25
25
|
import { CustomManifestsArray } from './CustomManifestsArray';
|
|
26
|
+
import { userProvidedManifests } from './utils';
|
|
26
27
|
import { selectCurrentClusterPermissionsState } from '../../../../store/slices/current-cluster/selectors';
|
|
27
28
|
import { useClusterWizardContext } from '../../../clusterWizard/ClusterWizardContext';
|
|
28
29
|
import { ClustersAPI } from '../../../../services/apis';
|
|
@@ -70,7 +71,8 @@ export const CustomManifestsForm = ({
|
|
|
70
71
|
if (customManifests && !customManifestsLocalRef.current.length) {
|
|
71
72
|
const initValues = getInitialValues(customManifests);
|
|
72
73
|
setInitialValues(initValues);
|
|
73
|
-
customManifestsLocalRef.current =
|
|
74
|
+
customManifestsLocalRef.current =
|
|
75
|
+
userProvidedManifests(customManifests).length > 0 ? initValues.manifests : [];
|
|
74
76
|
}
|
|
75
77
|
}, [customManifests, getInitialValues]);
|
|
76
78
|
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { CustomManifestValues, ListManifestsExtended, ManifestFormData } from '../data/dataTypes';
|
|
2
2
|
|
|
3
|
+
/** Manifests created by the installer (e.g. OVE defaults); not editable in the wizard. */
|
|
4
|
+
export const userProvidedManifests = <T extends { manifestSource?: string }>(
|
|
5
|
+
manifests: T[] | undefined,
|
|
6
|
+
): T[] => (manifests ?? []).filter((m) => m.manifestSource !== 'system');
|
|
7
|
+
|
|
3
8
|
export const getManifestName = (manifestIdx: number) => `Custom manifest ${manifestIdx + 1}`;
|
|
4
9
|
|
|
5
10
|
export const getFormData = (manifests: ListManifestsExtended): ManifestFormData => {
|
|
@@ -18,11 +23,11 @@ export const getEmptyManifest = (): CustomManifestValues => {
|
|
|
18
23
|
};
|
|
19
24
|
|
|
20
25
|
export const getManifestValues = (manifests: ListManifestsExtended): ManifestFormData => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return getEmptyManifestsValues();
|
|
26
|
+
const userManifests = userProvidedManifests(manifests);
|
|
27
|
+
if (userManifests.length > 0) {
|
|
28
|
+
return getFormData(userManifests);
|
|
25
29
|
}
|
|
30
|
+
return getEmptyManifestsValues();
|
|
26
31
|
};
|
|
27
32
|
|
|
28
33
|
export const getEmptyManifestsValues = (): ManifestFormData => {
|
|
@@ -32,8 +37,9 @@ export const getEmptyManifestsValues = (): ManifestFormData => {
|
|
|
32
37
|
export const getClusterCustomManifests = (
|
|
33
38
|
customManifests: ListManifestsExtended,
|
|
34
39
|
): CustomManifestValues[] => {
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
const userManifests = userProvidedManifests(customManifests);
|
|
41
|
+
if (userManifests.length > 0) {
|
|
42
|
+
return userManifests.map((manifest) => ({
|
|
37
43
|
folder: manifest.folder || 'manifests',
|
|
38
44
|
filename: manifest.fileName || '',
|
|
39
45
|
manifestYaml: manifest.yamlContent || '',
|
package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx
CHANGED
|
@@ -113,20 +113,18 @@ const NetworkConfigurationForm: React.FC<{
|
|
|
113
113
|
clusterWizardContext.moveNext();
|
|
114
114
|
}, [addAlert, cluster.id, clusterWizardContext, dispatch, isSingleClusterFeatureEnabled]);
|
|
115
115
|
|
|
116
|
-
const isNextDisabled =
|
|
117
|
-
isSubmitting ||
|
|
118
|
-
isAutoSaveRunning ||
|
|
119
|
-
!!alerts.length ||
|
|
120
|
-
!isValid ||
|
|
121
|
-
!canNextNetwork({ cluster });
|
|
122
|
-
|
|
123
116
|
const footer = (
|
|
124
117
|
<ClusterWizardFooter
|
|
125
118
|
cluster={cluster}
|
|
126
119
|
errorFields={errorFields}
|
|
127
120
|
isSubmitting={isSubmitting}
|
|
128
|
-
isNextDisabled={
|
|
129
|
-
|
|
121
|
+
isNextDisabled={
|
|
122
|
+
isSubmitting ||
|
|
123
|
+
isAutoSaveRunning ||
|
|
124
|
+
!!alerts.length ||
|
|
125
|
+
!isValid ||
|
|
126
|
+
!canNextNetwork({ cluster })
|
|
127
|
+
}
|
|
130
128
|
onNext={() => void onNext()}
|
|
131
129
|
onBack={() => clusterWizardContext.moveBack()}
|
|
132
130
|
isBackDisabled={isSubmitting || isAutoSaveRunning}
|
|
@@ -136,31 +136,51 @@ const OperatorCheckbox = ({
|
|
|
136
136
|
const fieldId = getFieldId(operatorId, 'input');
|
|
137
137
|
const supportLevel = getFeatureSupportLevel(featureId);
|
|
138
138
|
|
|
139
|
-
const
|
|
140
|
-
(
|
|
139
|
+
const isRequiredByBundle = values.selectedBundles.some(
|
|
140
|
+
(selectedBundle) =>
|
|
141
|
+
!!bundles.find((bundle) => bundle.id === selectedBundle.id)?.operators?.includes(operatorId),
|
|
141
142
|
);
|
|
143
|
+
const isSelectedForBundle = values.selectedBundles.some((selectedBundle) =>
|
|
144
|
+
selectedBundle.optionalOperators?.includes(operatorId),
|
|
145
|
+
);
|
|
146
|
+
const isInBundle = isRequiredByBundle || isSelectedForBundle;
|
|
147
|
+
|
|
148
|
+
const isOperatorActive = (opName: string) =>
|
|
149
|
+
values.selectedOperators.includes(opName) ||
|
|
150
|
+
values.selectedBundles.some((selectedBundle) => {
|
|
151
|
+
const bundle = bundles.find(({ id }) => id === selectedBundle.id);
|
|
152
|
+
return (
|
|
153
|
+
bundle?.operators?.includes(opName) || selectedBundle.optionalOperators?.includes(opName)
|
|
154
|
+
);
|
|
155
|
+
});
|
|
142
156
|
|
|
143
157
|
const isChecked = values.selectedOperators.includes(operatorId) || isInBundle;
|
|
144
158
|
|
|
145
|
-
const parentOperator = preflightRequirements?.operators?.find(
|
|
146
|
-
op
|
|
159
|
+
const parentOperator = preflightRequirements?.operators?.find(
|
|
160
|
+
(op) =>
|
|
161
|
+
!!op.operatorName &&
|
|
162
|
+
op.dependencies?.includes(operatorId) &&
|
|
163
|
+
isOperatorActive(op.operatorName),
|
|
147
164
|
);
|
|
148
165
|
|
|
149
|
-
let
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
) {
|
|
154
|
-
parentOperatorName = opSpecs[parentOperator.operatorName]?.title || parentOperator.operatorName;
|
|
166
|
+
let requiredByOperatorName = '';
|
|
167
|
+
if (parentOperator?.operatorName) {
|
|
168
|
+
requiredByOperatorName =
|
|
169
|
+
opSpecs[parentOperator.operatorName]?.title || parentOperator.operatorName;
|
|
155
170
|
}
|
|
156
171
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
172
|
+
let disabledReason = getFeatureDisabledReason(featureId);
|
|
173
|
+
|
|
174
|
+
if (isRequiredByBundle) {
|
|
175
|
+
disabledReason = 'This operator is part of a selected bundle and cannot be deselected.';
|
|
176
|
+
} else if (isSelectedForBundle) {
|
|
177
|
+
disabledReason =
|
|
178
|
+
'This optional operator is selected through a bundle. Use the bundle card to change it.';
|
|
179
|
+
} else if (requiredByOperatorName) {
|
|
180
|
+
disabledReason = `This operator is required by ${requiredByOperatorName}`;
|
|
181
|
+
} else if (notStandalone && !values.selectedOperators.includes(operatorId)) {
|
|
182
|
+
disabledReason = 'This operator cannot be installed as a standalone';
|
|
183
|
+
}
|
|
164
184
|
|
|
165
185
|
return (
|
|
166
186
|
<FormGroup fieldId={fieldId} id={`form-control__${fieldId}`}>
|
|
@@ -31,10 +31,9 @@ export const bundleSpecs: { [key: string]: BundleSpec } = {
|
|
|
31
31
|
incompatibleBundles: [],
|
|
32
32
|
Description: () => (
|
|
33
33
|
<List>
|
|
34
|
-
<ListItem>GPUs are recommended for optimal AI/ML workload performance.</ListItem>
|
|
35
34
|
<ListItem>
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
GPUs are recommended for optimal AI/ML workload performance. Please select the GPU
|
|
36
|
+
operators you want to install.
|
|
38
37
|
</ListItem>
|
|
39
38
|
</List>
|
|
40
39
|
),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BundleCreateParams,
|
|
2
3
|
Bundle,
|
|
3
4
|
PreflightHardwareRequirements,
|
|
4
5
|
} from '@openshift-assisted/types/assisted-installer-service';
|
|
@@ -68,7 +69,7 @@ const getBundleOperators = (
|
|
|
68
69
|
|
|
69
70
|
export const getNewBundleOperators = (
|
|
70
71
|
currentOperators: string[],
|
|
71
|
-
currentBundles:
|
|
72
|
+
currentBundles: BundleCreateParams[],
|
|
72
73
|
allBundles: Bundle[],
|
|
73
74
|
newBundle: Bundle,
|
|
74
75
|
preflightRequirements: PreflightHardwareRequirements | undefined,
|
|
@@ -81,10 +82,10 @@ export const getNewBundleOperators = (
|
|
|
81
82
|
return Array.from(new Set(combined));
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
const newBundles = currentBundles.filter((
|
|
85
|
+
const newBundles = currentBundles.filter((bundle) => bundle.id !== newBundle.id);
|
|
85
86
|
const operatorsToKeep = [
|
|
86
|
-
...newBundles.reduce((acc,
|
|
87
|
-
const bundle = allBundles.find(({ id }) => id ===
|
|
87
|
+
...newBundles.reduce((acc, selectedBundle) => {
|
|
88
|
+
const bundle = allBundles.find(({ id }) => id === selectedBundle.id);
|
|
88
89
|
if (bundle) {
|
|
89
90
|
const bundleOperators = getBundleOperators(bundle, preflightRequirements);
|
|
90
91
|
bundleOperators.forEach((op) => {
|
|
@@ -1,17 +1,75 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Title } from '@patternfly/react-core';
|
|
2
3
|
import { Table, TableVariant, Tbody, Td, Tr } from '@patternfly/react-table';
|
|
3
|
-
import { genericTableRowKey } from '../../../../common';
|
|
4
|
-
import {
|
|
4
|
+
import { genericTableRowKey, selectOlmOperators } from '../../../../common';
|
|
5
|
+
import { useStateSafely } from '../../../../common/hooks';
|
|
6
|
+
import { Bundle, Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
5
7
|
import { TableSummaryExpandable } from './TableSummaryExpandable';
|
|
6
8
|
import { useOperatorSpecs } from '../../../../common/components/operators/operatorSpecs';
|
|
9
|
+
import BundleService from '../../../services/BundleService';
|
|
10
|
+
|
|
11
|
+
const fetchBundles = async (
|
|
12
|
+
openshiftVersion: string,
|
|
13
|
+
cpuArchitecture: string,
|
|
14
|
+
platformType: string,
|
|
15
|
+
): Promise<Bundle[]> => {
|
|
16
|
+
try {
|
|
17
|
+
return await BundleService.listBundles(
|
|
18
|
+
openshiftVersion,
|
|
19
|
+
cpuArchitecture,
|
|
20
|
+
platformType,
|
|
21
|
+
undefined,
|
|
22
|
+
);
|
|
23
|
+
} catch (_e) {
|
|
24
|
+
return [] as Bundle[];
|
|
25
|
+
}
|
|
26
|
+
};
|
|
7
27
|
|
|
8
28
|
export const ReviewOperatorsTable = ({ cluster }: { cluster: Cluster }) => {
|
|
9
29
|
const { byKey: opSpecs } = useOperatorSpecs();
|
|
30
|
+
const selectedBundles = cluster.operatorBundles || [];
|
|
31
|
+
const [bundleTitlesById, setBundleTitlesById] = useStateSafely<Record<string, string>>({});
|
|
32
|
+
const hasFetchedBundles = React.useRef(false);
|
|
33
|
+
const hasSelectedBundles = selectedBundles.length > 0;
|
|
34
|
+
React.useEffect(() => {
|
|
35
|
+
if (!hasFetchedBundles.current && hasSelectedBundles) {
|
|
36
|
+
hasFetchedBundles.current = true;
|
|
37
|
+
void (async () => {
|
|
38
|
+
const bundles = await fetchBundles(
|
|
39
|
+
cluster.openshiftVersion || '',
|
|
40
|
+
cluster.cpuArchitecture || '',
|
|
41
|
+
cluster.platform?.type || '',
|
|
42
|
+
);
|
|
43
|
+
const titlesById = Object.fromEntries(
|
|
44
|
+
bundles
|
|
45
|
+
.filter((bundle) => !!bundle.id && !!bundle.title)
|
|
46
|
+
.map((bundle) => [bundle.id, bundle.title]),
|
|
47
|
+
) as Record<string, string>;
|
|
48
|
+
setBundleTitlesById(titlesById);
|
|
49
|
+
})();
|
|
50
|
+
}
|
|
51
|
+
}, [
|
|
52
|
+
cluster.cpuArchitecture,
|
|
53
|
+
cluster.openshiftVersion,
|
|
54
|
+
cluster.platform?.type,
|
|
55
|
+
hasSelectedBundles,
|
|
56
|
+
setBundleTitlesById,
|
|
57
|
+
]);
|
|
58
|
+
|
|
59
|
+
const bundleRows = selectedBundles.map((bundle) => ({
|
|
60
|
+
rowId: `bundle-${bundle.id}`,
|
|
61
|
+
cells: [
|
|
62
|
+
{
|
|
63
|
+
title: bundleTitlesById[bundle.id] || bundle.id,
|
|
64
|
+
props: { 'data-testid': `bundle-${bundle.id}` },
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
}));
|
|
10
68
|
|
|
11
69
|
const rows = React.useMemo(
|
|
12
70
|
() =>
|
|
13
|
-
cluster
|
|
14
|
-
|
|
71
|
+
selectOlmOperators(cluster)
|
|
72
|
+
.filter(({ name }) => !!name && !!opSpecs[name])
|
|
15
73
|
.map((op) => {
|
|
16
74
|
const opId = op.name as string;
|
|
17
75
|
return {
|
|
@@ -25,33 +83,65 @@ export const ReviewOperatorsTable = ({ cluster }: { cluster: Cluster }) => {
|
|
|
25
83
|
],
|
|
26
84
|
};
|
|
27
85
|
}),
|
|
28
|
-
[cluster
|
|
86
|
+
[cluster, opSpecs],
|
|
29
87
|
);
|
|
30
88
|
|
|
31
|
-
if (!rows?.length) {
|
|
89
|
+
if (!rows?.length && selectedBundles.length === 0) {
|
|
32
90
|
return null;
|
|
33
91
|
}
|
|
34
92
|
|
|
35
93
|
return (
|
|
36
|
-
<TableSummaryExpandable title={'
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
94
|
+
<TableSummaryExpandable title={'Bundles and operators'} id={'operators-expandable'}>
|
|
95
|
+
{bundleRows.length > 0 && (
|
|
96
|
+
<>
|
|
97
|
+
<Title headingLevel="h4" size="md" className="pf-v6-u-mb-sm">
|
|
98
|
+
Bundles ({bundleRows.length})
|
|
99
|
+
</Title>
|
|
100
|
+
<Table
|
|
101
|
+
variant={TableVariant.compact}
|
|
102
|
+
borders={false}
|
|
103
|
+
aria-label={'Bundles review table'}
|
|
104
|
+
className="review-table pf-v6-u-mb-md"
|
|
105
|
+
>
|
|
106
|
+
<Tbody>
|
|
107
|
+
{bundleRows.map((row, i) => (
|
|
108
|
+
<Tr key={genericTableRowKey(row.rowId)}>
|
|
109
|
+
{row.cells.map((cell, j) => (
|
|
110
|
+
<Td key={`bundle-cell-${i}-${j}`} {...cell.props}>
|
|
111
|
+
{cell.title}
|
|
112
|
+
</Td>
|
|
113
|
+
))}
|
|
114
|
+
</Tr>
|
|
115
|
+
))}
|
|
116
|
+
</Tbody>
|
|
117
|
+
</Table>
|
|
118
|
+
</>
|
|
119
|
+
)}
|
|
120
|
+
{rows.length > 0 && (
|
|
121
|
+
<>
|
|
122
|
+
<Title headingLevel="h4" size="md" className="pf-v6-u-mb-sm">
|
|
123
|
+
Operators ({rows.length})
|
|
124
|
+
</Title>
|
|
125
|
+
<Table
|
|
126
|
+
variant={TableVariant.compact}
|
|
127
|
+
borders={false}
|
|
128
|
+
aria-label={'Operators review table'}
|
|
129
|
+
className="review-table"
|
|
130
|
+
>
|
|
131
|
+
<Tbody>
|
|
132
|
+
{rows.map((row, i) => (
|
|
133
|
+
<Tr key={genericTableRowKey(row.rowId)}>
|
|
134
|
+
{row.cells.map((cell, j) => (
|
|
135
|
+
<Td key={`cell-${i}-${j}`} {...cell.props}>
|
|
136
|
+
{cell.title}
|
|
137
|
+
</Td>
|
|
138
|
+
))}
|
|
139
|
+
</Tr>
|
|
50
140
|
))}
|
|
51
|
-
</
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
141
|
+
</Tbody>
|
|
142
|
+
</Table>
|
|
143
|
+
</>
|
|
144
|
+
)}
|
|
55
145
|
</TableSummaryExpandable>
|
|
56
146
|
);
|
|
57
147
|
};
|
|
@@ -19,10 +19,7 @@ import { ReviewCustomManifestsTable } from './ReviewCustomManifestsTable';
|
|
|
19
19
|
import PlatformIntegrationNote from '../platformIntegration/PlatformIntegrationNote';
|
|
20
20
|
import useClusterCustomManifests from '../../../hooks/useClusterCustomManifests';
|
|
21
21
|
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
const userProvidedManifests = (manifests: ListManifestsExtended | undefined) =>
|
|
25
|
-
(manifests ?? []).filter((m) => m.manifestSource !== 'system');
|
|
22
|
+
import { userProvidedManifests } from '../manifestsConfiguration/components/utils';
|
|
26
23
|
|
|
27
24
|
export const ReviewSummaryContent = ({ cluster }: { cluster: Cluster }) => {
|
|
28
25
|
const { customManifests } = useClusterCustomManifests(cluster.id, false);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExpandableSection, Content } from '@patternfly/react-core';
|
|
3
|
+
import './TableSummaryExpandable.css';
|
|
3
4
|
|
|
4
5
|
export const TableSummaryExpandable = ({
|
|
5
6
|
title,
|
|
@@ -20,7 +21,6 @@ export const TableSummaryExpandable = ({
|
|
|
20
21
|
id={id ? id : title}
|
|
21
22
|
>
|
|
22
23
|
{children}
|
|
23
|
-
<br />
|
|
24
24
|
</ExpandableSection>
|
|
25
25
|
);
|
|
26
26
|
};
|
|
@@ -3,7 +3,7 @@ import { isDualStack } from '../../../../common';
|
|
|
3
3
|
import { Cluster, DiskEncryption } from '@openshift-assisted/types/assisted-installer-service';
|
|
4
4
|
|
|
5
5
|
export const getManagementType = ({ userManagedNetworking }: Cluster): string =>
|
|
6
|
-
userManagedNetworking ? 'User-
|
|
6
|
+
userManagedNetworking ? 'User-managed networking' : 'Cluster-managed networking';
|
|
7
7
|
|
|
8
8
|
export const getStackTypeLabel = (cluster: Cluster): string =>
|
|
9
9
|
isDualStack(cluster) ? 'Dual-stack' : 'IPv4';
|
|
@@ -8,6 +8,8 @@ import { useErrorMonitor } from '../../../../../common/components/ErrorHandling/
|
|
|
8
8
|
import { getApiErrorMessage } from '../../../../../common/api';
|
|
9
9
|
import { StaticIpFormProps } from './propTypes';
|
|
10
10
|
import { selectCurrentClusterPermissionsState } from '../../../../store/slices/current-cluster/selectors';
|
|
11
|
+
import { useFeature } from '../../../../hooks/use-feature';
|
|
12
|
+
import { getStaticNetworkConfig } from '../data/fromInfraEnv';
|
|
11
13
|
|
|
12
14
|
/** Reports form state and triggers save on every value change (useFormikAutoSave) */
|
|
13
15
|
const AutosaveWithParentUpdate = <StaticIpFormValues extends object>({
|
|
@@ -69,7 +71,14 @@ export const StaticIpForm = <StaticIpFormValues extends object>({
|
|
|
69
71
|
const { clearAlerts, addAlert } = useAlerts();
|
|
70
72
|
const { captureException } = useErrorMonitor();
|
|
71
73
|
const { isViewerMode } = useSelector(selectCurrentClusterPermissionsState);
|
|
72
|
-
const
|
|
74
|
+
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
75
|
+
const prefillFromInfraEnv = isSingleClusterFeatureEnabled && !!getStaticNetworkConfig(infraEnv);
|
|
76
|
+
const initialValues = React.useMemo(() => {
|
|
77
|
+
if (showEmptyValues && !prefillFromInfraEnv) {
|
|
78
|
+
return getEmptyValues();
|
|
79
|
+
}
|
|
80
|
+
return getInitialValues(infraEnv);
|
|
81
|
+
}, [showEmptyValues, prefillFromInfraEnv, infraEnv, getInitialValues, getEmptyValues]);
|
|
73
82
|
|
|
74
83
|
const handleSubmit = async (values: StaticIpFormValues) => {
|
|
75
84
|
clearAlerts();
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
} from '@patternfly/react-core';
|
|
10
10
|
import { StaticIpInfo, StaticIpView } from '../data/dataTypes';
|
|
11
11
|
import StaticIpViewRadioGroup from './StaticIpViewRadioGroup';
|
|
12
|
-
import { getStaticIpInfo } from '../data/fromInfraEnv';
|
|
12
|
+
import { getStaticIpInfo, getStaticNetworkConfig } from '../data/fromInfraEnv';
|
|
13
|
+
import { useFeature } from '../../../../hooks/use-feature';
|
|
13
14
|
import { StaticIpFormState, StaticIpPageProps, StaticIpViewProps } from './propTypes';
|
|
14
15
|
import { YamlView } from './YamlView/YamlView';
|
|
15
16
|
import { useClusterWizardContext } from '../../../clusterWizard/ClusterWizardContext';
|
|
@@ -34,6 +35,8 @@ export const StaticIpPage: React.FC<StaticIpPageProps> = ({
|
|
|
34
35
|
onFormStateChange: onFormStateChangeParent,
|
|
35
36
|
}) => {
|
|
36
37
|
const clusterWizardContext = useClusterWizardContext();
|
|
38
|
+
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
39
|
+
const prefillFromInfraEnv = isSingleClusterFeatureEnabled && !!getStaticNetworkConfig(infraEnv);
|
|
37
40
|
const [confirmOnChangeView, setConfirmOnChangeView] = React.useState<boolean>(false);
|
|
38
41
|
const [viewChanged, setViewChanged] = React.useState<boolean>(false);
|
|
39
42
|
|
|
@@ -45,10 +48,10 @@ export const StaticIpPage: React.FC<StaticIpPageProps> = ({
|
|
|
45
48
|
[clusterWizardContext],
|
|
46
49
|
);
|
|
47
50
|
|
|
48
|
-
const initialStaticIpInfo = React.useMemo<StaticIpInfo | undefined>(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
const initialStaticIpInfo = React.useMemo<StaticIpInfo | undefined>(
|
|
52
|
+
() => getStaticIpInfo(infraEnv),
|
|
53
|
+
[infraEnv],
|
|
54
|
+
);
|
|
52
55
|
|
|
53
56
|
const onFormStateChange = React.useCallback(
|
|
54
57
|
(formState: StaticIpFormState) => {
|
|
@@ -65,7 +68,7 @@ export const StaticIpPage: React.FC<StaticIpPageProps> = ({
|
|
|
65
68
|
onFormStateChange,
|
|
66
69
|
infraEnv,
|
|
67
70
|
updateInfraEnv,
|
|
68
|
-
showEmptyValues: viewChanged,
|
|
71
|
+
showEmptyValues: viewChanged && !prefillFromInfraEnv,
|
|
69
72
|
};
|
|
70
73
|
|
|
71
74
|
const content = (() => {
|