@openshift-assisted/ui-lib 2.53.1 → 2.54.1
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/ClusterDeployment/wizardTransition.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
- 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/validationsInfoUtils.d.ts +0 -1
- package/build/@types/common/components/clusterWizard/validationsInfoUtils.d.ts.map +1 -1
- package/build/@types/common/components/hosts/utils.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/selectors/clusterSelectors.d.ts +1 -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/operators/OperatorCheckbox.d.ts +3 -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 +3 -6
- 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/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/OperatorsSelect.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 +3 -4
- package/build/@types/ocm/components/clusterWizard/wizardTransition.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/validationsInfoUtils.js +1 -17
- package/build/cjs/common/components/clusterWizard/validationsInfoUtils.js.map +1 -1
- package/build/cjs/common/components/hosts/utils.js +6 -1
- package/build/cjs/common/components/hosts/utils.js.map +1 -1
- package/build/cjs/common/config/constants.js +4 -0
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/selectors/clusterSelectors.js +7 -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/operators/OperatorCheckbox.js +39 -21
- 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 +7 -25
- 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/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/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.js +18 -4
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.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 +69 -29
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.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/validationsInfoUtils.ts +0 -20
- package/lib/common/components/hosts/utils.ts +8 -1
- package/lib/common/config/constants.ts +4 -0
- package/lib/common/selectors/clusterSelectors.ts +9 -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/operators/OperatorCheckbox.tsx +48 -34
- package/lib/ocm/components/clusterConfiguration/operators/bundleSpecs.tsx +2 -3
- package/lib/ocm/components/clusterConfiguration/operators/utils.tsx +6 -37
- 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/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/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/OperatorsSelect.tsx +21 -4
- 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 +92 -37
- 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
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
Cluster,
|
|
3
|
+
ClusterValidationId,
|
|
4
|
+
Host,
|
|
5
|
+
HostValidationId,
|
|
6
|
+
} from '@openshift-assisted/types/assisted-installer-service';
|
|
7
|
+
import {
|
|
3
8
|
getAllClusterWizardSoftValidationIds,
|
|
4
9
|
getWizardStepClusterStatus,
|
|
5
10
|
WizardStepsValidationMap,
|
|
@@ -12,11 +17,9 @@ import {
|
|
|
12
17
|
Validation as HostValidation,
|
|
13
18
|
} from '../../../common/types/hosts';
|
|
14
19
|
import { getKeys, stringToJSON } from '../../../common/utils';
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
HostValidationId,
|
|
19
|
-
} from '@openshift-assisted/types/assisted-installer-service';
|
|
20
|
+
import { Validation, ValidationsInfo } from '../../../common';
|
|
21
|
+
|
|
22
|
+
type ValidationId = ClusterValidationId | HostValidationId;
|
|
20
23
|
|
|
21
24
|
export type ClusterWizardStepsType =
|
|
22
25
|
| 'cluster-details'
|
|
@@ -55,16 +58,6 @@ export const disconnectedSteps: ClusterWizardStepsType[] = [
|
|
|
55
58
|
export const ClusterWizardFlowStateNew = 'new';
|
|
56
59
|
export type ClusterWizardFlowStateType = Cluster['status'] | typeof ClusterWizardFlowStateNew;
|
|
57
60
|
|
|
58
|
-
export const getLastStepForWizard = (
|
|
59
|
-
customManifestsStepNeedsToBeFilled: boolean,
|
|
60
|
-
): ClusterWizardStepsType => {
|
|
61
|
-
if (customManifestsStepNeedsToBeFilled) {
|
|
62
|
-
return 'custom-manifests';
|
|
63
|
-
} else {
|
|
64
|
-
return 'review';
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
61
|
export const isStepAfter = (stepA: ClusterWizardStepsType, stepB: ClusterWizardStepsType) => {
|
|
69
62
|
const indexA = wizardStepsOrder.findIndex((step) => step === stepA);
|
|
70
63
|
const indexB = wizardStepsOrder.findIndex((step) => step === stepB);
|
|
@@ -79,8 +72,7 @@ export const getClusterWizardFirstStep = (
|
|
|
79
72
|
locationState: ClusterWizardFlowStateType | undefined,
|
|
80
73
|
staticIpInfo: StaticIpInfo | undefined,
|
|
81
74
|
state?: ClusterWizardFlowStateType,
|
|
82
|
-
|
|
83
|
-
customManifestsStepNeedsToBeFilled?: boolean,
|
|
75
|
+
cluster?: Cluster,
|
|
84
76
|
): ClusterWizardStepsType => {
|
|
85
77
|
// Just for the first time when the cluster is created
|
|
86
78
|
if (locationState === ClusterWizardFlowStateNew && !staticIpInfo) {
|
|
@@ -96,40 +88,42 @@ export const getClusterWizardFirstStep = (
|
|
|
96
88
|
|
|
97
89
|
switch (state) {
|
|
98
90
|
case 'ready':
|
|
99
|
-
return
|
|
91
|
+
return 'review';
|
|
100
92
|
case 'pending-for-input':
|
|
101
93
|
case 'adding-hosts':
|
|
102
94
|
case 'insufficient':
|
|
103
|
-
|
|
104
|
-
return 'custom-manifests';
|
|
105
|
-
}
|
|
106
|
-
return getStepForFailingHostValidations(hosts);
|
|
95
|
+
return getStepForFailingValidations(cluster);
|
|
107
96
|
default:
|
|
108
97
|
return 'cluster-details';
|
|
109
98
|
}
|
|
110
99
|
};
|
|
111
100
|
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
101
|
+
const MINIMUM_STEP = 'host-discovery';
|
|
102
|
+
const getStepForFailingValidations = (cluster?: Cluster) => {
|
|
103
|
+
// test host validations first, then cluster validations
|
|
104
|
+
const failingValidations: Set<ValidationId> = new Set<ValidationId>([
|
|
105
|
+
...getHostFailingValidationIds(cluster?.hosts),
|
|
106
|
+
...getClusterFailingValidationIds(cluster),
|
|
107
|
+
]);
|
|
108
|
+
|
|
115
109
|
let step;
|
|
116
110
|
for (const failingValidationId of failingValidations) {
|
|
117
|
-
step = findValidationStep
|
|
111
|
+
step = findValidationStep(failingValidationId, wizardStepsValidationsMap);
|
|
118
112
|
if (step !== undefined) {
|
|
119
113
|
break;
|
|
120
114
|
}
|
|
121
115
|
}
|
|
122
|
-
return
|
|
116
|
+
return step || MINIMUM_STEP;
|
|
123
117
|
};
|
|
124
118
|
|
|
125
|
-
const getHostFailingValidationIds = (hosts
|
|
126
|
-
const failingValidations
|
|
119
|
+
const getHostFailingValidationIds = (hosts?: Host[]): Set<ValidationId> => {
|
|
120
|
+
const failingValidations = new Set<HostValidationId>();
|
|
127
121
|
hosts?.forEach((host) => {
|
|
128
122
|
const validationsInfo = stringToJSON<HostValidationsInfo>(host.validationsInfo) || {};
|
|
129
123
|
getKeys(validationsInfo).forEach((group) => {
|
|
130
124
|
const f: (validation: HostValidation) => void = (validation) => {
|
|
131
125
|
if (validation.status === 'failure') {
|
|
132
|
-
failingValidations.
|
|
126
|
+
failingValidations.add(validation.id);
|
|
133
127
|
}
|
|
134
128
|
};
|
|
135
129
|
const validationGroup = validationsInfo[group] as HostValidation[];
|
|
@@ -139,6 +133,47 @@ const getHostFailingValidationIds = (hosts: Host[] | undefined) => {
|
|
|
139
133
|
return failingValidations;
|
|
140
134
|
};
|
|
141
135
|
|
|
136
|
+
const getClusterFailingValidationIds = (cluster?: Cluster): Set<ValidationId> => {
|
|
137
|
+
const failingValidations = new Set<ValidationId>();
|
|
138
|
+
const validationsInfo = stringToJSON<ValidationsInfo>(cluster?.validationsInfo) || {};
|
|
139
|
+
|
|
140
|
+
getKeys(validationsInfo).forEach((group) => {
|
|
141
|
+
const f: (validation: Validation) => void = (validation) => {
|
|
142
|
+
if (validation.status === 'failure') {
|
|
143
|
+
failingValidations.add(validation.id);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
const validationGroup = validationsInfo[group] as Validation[];
|
|
147
|
+
validationGroup.forEach(f);
|
|
148
|
+
});
|
|
149
|
+
return failingValidations;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const findValidationStep = (
|
|
153
|
+
validationId: ValidationId,
|
|
154
|
+
wizardStepsValidationsMap: WizardStepsValidationMap<ClusterWizardStepsType>,
|
|
155
|
+
): ClusterWizardStepsType | undefined => {
|
|
156
|
+
let isBeforeMinimumStep = true;
|
|
157
|
+
|
|
158
|
+
return wizardStepsOrder.find((wizardStepId) => {
|
|
159
|
+
if (wizardStepId === MINIMUM_STEP) {
|
|
160
|
+
isBeforeMinimumStep = false;
|
|
161
|
+
}
|
|
162
|
+
if (isBeforeMinimumStep) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// find first matching validation-map name, ignoring steps before minimumStep
|
|
167
|
+
const { host: hostValidationMap, cluster: clusterValidationMap } =
|
|
168
|
+
wizardStepsValidationsMap[wizardStepId];
|
|
169
|
+
|
|
170
|
+
return (
|
|
171
|
+
hostValidationMap.validationIds.includes(validationId as HostValidationId) ||
|
|
172
|
+
clusterValidationMap.validationIds.includes(validationId as ClusterValidationId)
|
|
173
|
+
);
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
|
|
142
177
|
type TransitionProps = { cluster: Cluster };
|
|
143
178
|
|
|
144
179
|
const buildEmptyValidationsMap = (): WizardStepValidationMap => ({
|
|
@@ -190,6 +225,7 @@ const hostDiscoveryStepValidationsMap: WizardStepValidationMap = {
|
|
|
190
225
|
groups: ['hardware'],
|
|
191
226
|
validationIds: [
|
|
192
227
|
'connected',
|
|
228
|
+
'hostname-valid',
|
|
193
229
|
'media-connected',
|
|
194
230
|
'lso-requirements-satisfied',
|
|
195
231
|
'odf-requirements-satisfied',
|
|
@@ -206,6 +242,7 @@ const hostDiscoveryStepValidationsMap: WizardStepValidationMap = {
|
|
|
206
242
|
'no-skip-missing-disk',
|
|
207
243
|
'compatible-agent',
|
|
208
244
|
'openshift-ai-gpu-requirements-satisfied',
|
|
245
|
+
'inventory-not-partially-truncated',
|
|
209
246
|
],
|
|
210
247
|
};
|
|
211
248
|
|
|
@@ -224,18 +261,24 @@ const storageStepValidationsMap: WizardStepValidationMap = {
|
|
|
224
261
|
'no-skip-missing-disk',
|
|
225
262
|
],
|
|
226
263
|
},
|
|
227
|
-
softValidationIds: [],
|
|
264
|
+
softValidationIds: ['inventory-not-partially-truncated'],
|
|
228
265
|
};
|
|
229
266
|
|
|
230
267
|
const networkingStepValidationsMap: WizardStepValidationMap = {
|
|
231
268
|
cluster: {
|
|
232
269
|
groups: ['network'],
|
|
233
|
-
validationIds: [
|
|
270
|
+
validationIds: [
|
|
271
|
+
'api-vips-defined',
|
|
272
|
+
'machine-cidr-defined',
|
|
273
|
+
'cluster-cidr-defined',
|
|
274
|
+
'service-cidr-defined',
|
|
275
|
+
'all-hosts-are-ready-to-install',
|
|
276
|
+
],
|
|
234
277
|
},
|
|
235
278
|
host: {
|
|
236
279
|
allowedStatuses: ['known', 'disabled'],
|
|
237
280
|
groups: ['network'],
|
|
238
|
-
validationIds: [],
|
|
281
|
+
validationIds: ['apps-domain-name-resolved-correctly'],
|
|
239
282
|
},
|
|
240
283
|
// TODO(jtomasek): container-images-available validation is currently not running on the backend, it stays in pending.
|
|
241
284
|
// marking it as soft validation is the easy way to prevent it from blocking the progress.
|
|
@@ -250,6 +293,19 @@ const networkingStepValidationsMap: WizardStepValidationMap = {
|
|
|
250
293
|
],
|
|
251
294
|
};
|
|
252
295
|
|
|
296
|
+
const customManifestsValidationsMap: WizardStepValidationMap = {
|
|
297
|
+
cluster: {
|
|
298
|
+
groups: ['network'],
|
|
299
|
+
validationIds: ['platform-requirements-satisfied', 'custom-manifests-requirements-satisfied'],
|
|
300
|
+
},
|
|
301
|
+
host: {
|
|
302
|
+
allowedStatuses: ['known', 'disabled'],
|
|
303
|
+
groups: ['network'],
|
|
304
|
+
validationIds: [],
|
|
305
|
+
},
|
|
306
|
+
softValidationIds: ['ntp-synced', 'container-images-available', 'mtu-valid'],
|
|
307
|
+
};
|
|
308
|
+
|
|
253
309
|
const reviewStepValidationsMap: WizardStepValidationMap = {
|
|
254
310
|
cluster: {
|
|
255
311
|
groups: [],
|
|
@@ -265,7 +321,6 @@ const reviewStepValidationsMap: WizardStepValidationMap = {
|
|
|
265
321
|
|
|
266
322
|
const credentialsValidationMap = buildEmptyValidationsMap();
|
|
267
323
|
|
|
268
|
-
const customManifestsValidationsMap = buildEmptyValidationsMap();
|
|
269
324
|
const disconnectedReviewValidationsMap = buildEmptyValidationsMap();
|
|
270
325
|
const disconnectedBasicValidationsMap = buildEmptyValidationsMap();
|
|
271
326
|
|
|
@@ -274,13 +329,13 @@ export const wizardStepsValidationsMap: WizardStepsValidationMap<ClusterWizardSt
|
|
|
274
329
|
'static-ip-yaml-view': staticIpValidationsMap,
|
|
275
330
|
'static-ip-network-wide-configurations': staticIpValidationsMap,
|
|
276
331
|
'static-ip-host-configurations': staticIpValidationsMap,
|
|
277
|
-
'custom-manifests': customManifestsValidationsMap,
|
|
278
332
|
operators: operatorsStepValidationsMap,
|
|
279
333
|
'host-discovery': hostDiscoveryStepValidationsMap,
|
|
280
334
|
storage: storageStepValidationsMap,
|
|
281
335
|
networking: networkingStepValidationsMap,
|
|
282
|
-
|
|
336
|
+
'custom-manifests': customManifestsValidationsMap,
|
|
283
337
|
'credentials-download': credentialsValidationMap,
|
|
338
|
+
review: reviewStepValidationsMap,
|
|
284
339
|
'disconnected-review': disconnectedReviewValidationsMap,
|
|
285
340
|
'disconnected-basic': disconnectedBasicValidationsMap,
|
|
286
341
|
};
|
|
@@ -55,12 +55,12 @@ export default function useInfraEnvId(
|
|
|
55
55
|
]);
|
|
56
56
|
|
|
57
57
|
React.useEffect(() => {
|
|
58
|
-
if (!clusterId) {
|
|
58
|
+
if (!clusterId && !isSingleClusterFeatureEnabled) {
|
|
59
59
|
setError('Missing clusterId to load infrastructure environment');
|
|
60
60
|
} else if (!infraEnvId) {
|
|
61
61
|
void findInfraEnvId();
|
|
62
62
|
}
|
|
63
|
-
}, [clusterId, findInfraEnvId, infraEnvId]);
|
|
63
|
+
}, [clusterId, findInfraEnvId, infraEnvId, isSingleClusterFeatureEnabled]);
|
|
64
64
|
|
|
65
65
|
return { infraEnvId, error };
|
|
66
66
|
}
|
|
@@ -21,7 +21,10 @@ const InfraEnvsService = {
|
|
|
21
21
|
const { data: infraEnvs } = await InfraEnvsAPI.list(
|
|
22
22
|
!isSingleClusterFeatureEnabled ? clusterId : '',
|
|
23
23
|
);
|
|
24
|
-
if (
|
|
24
|
+
if (isSingleClusterFeatureEnabled) {
|
|
25
|
+
return infraEnvs[0].id;
|
|
26
|
+
}
|
|
27
|
+
if (infraEnvs.length > 0 && clusterId) {
|
|
25
28
|
InfraEnvCache.updateInfraEnvs(clusterId, infraEnvs);
|
|
26
29
|
infraEnvId = InfraEnvCache.getInfraEnvId(clusterId, cpuArchitecture);
|
|
27
30
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@openshift-assisted/locales": "2.
|
|
4
|
-
"@openshift-assisted/types": "2.
|
|
3
|
+
"@openshift-assisted/locales": "2.54.1",
|
|
4
|
+
"@openshift-assisted/types": "2.54.1",
|
|
5
5
|
"@openshift-console/dynamic-plugin-sdk": "^4.19.1",
|
|
6
6
|
"@patternfly/patternfly": "6.4.0",
|
|
7
7
|
"@patternfly/react-code-editor": "6.4.1",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"ip-address": "^10.1.1",
|
|
25
25
|
"is-cidr": "^4.0.2",
|
|
26
26
|
"is-in-subnet": "^4",
|
|
27
|
-
"js-yaml": "^4.
|
|
27
|
+
"js-yaml": "^4.2.0",
|
|
28
28
|
"lodash-es": "^4.17.23",
|
|
29
29
|
"parse-url": "^9.2.0",
|
|
30
30
|
"prism-react-renderer": "^1.1.1",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"description": "React component library for the Assisted Installer UI",
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@tsconfig/recommended": "^1.0.
|
|
39
|
-
"@types/file-saver": "^2.0.
|
|
40
|
-
"@types/human-date": "^1.4.
|
|
41
|
-
"@types/humanize-plus": "^1.8.
|
|
42
|
-
"@types/js-yaml": "^4.0.
|
|
43
|
-
"@types/lodash-es": "^4.17.
|
|
44
|
-
"@types/node": "^24.
|
|
38
|
+
"@tsconfig/recommended": "^1.0.13",
|
|
39
|
+
"@types/file-saver": "^2.0.7",
|
|
40
|
+
"@types/human-date": "^1.4.5",
|
|
41
|
+
"@types/humanize-plus": "^1.8.2",
|
|
42
|
+
"@types/js-yaml": "^4.0.9",
|
|
43
|
+
"@types/lodash-es": "^4.17.12",
|
|
44
|
+
"@types/node": "^24.12.4",
|
|
45
45
|
"@types/react": "18.2.37",
|
|
46
46
|
"@types/react-autosuggest": "^10.1.5",
|
|
47
47
|
"@types/react-dom": "18.2.15",
|
|
@@ -136,5 +136,5 @@
|
|
|
136
136
|
]
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
-
"version": "2.
|
|
139
|
+
"version": "2.54.1"
|
|
140
140
|
}
|