@openshift-assisted/ui-lib 2.39.1 → 2.39.2
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/featureSupportLevels/ACMFeatureSupportLevelProvider.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts +0 -1
- package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/build/@types/common/components/clusterDetail/ClusterProgressItems.d.ts.map +1 -1
- package/build/@types/common/components/clusterDetail/OperatorsProgressItem.d.ts +2 -3
- package/build/@types/common/components/clusterDetail/OperatorsProgressItem.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/types.d.ts +2 -4
- package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
- package/build/@types/common/components/newFeatureSupportLevels/types.d.ts +1 -1
- package/build/@types/common/components/newFeatureSupportLevels/types.d.ts.map +1 -1
- package/build/@types/common/components/operators/operatorSpecs.d.ts +22 -0
- package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -0
- package/build/@types/common/config/constants.d.ts +2 -15
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/selectors/clusterSelectors.d.ts +1 -2
- package/build/@types/common/selectors/clusterSelectors.d.ts.map +1 -1
- package/build/@types/common/types/clusters.d.ts +3 -23
- package/build/@types/common/types/clusters.d.ts.map +1 -1
- package/build/@types/common/utils.d.ts +1 -0
- package/build/@types/common/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmClusterProgressItems.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmOperatorProgressItem.d.ts +2 -3
- package/build/@types/ocm/components/clusterConfiguration/OcmOperatorProgressItem.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OperatorCheckbox.d.ts +12 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/OperatorCheckbox.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/bundleSpecs.d.ts +13 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/bundleSpecs.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts +6 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.d.ts +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/clusterDetail/ProgressBarAlerts.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContextProvider.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/Operators.d.ts +1 -3
- package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts +9 -0
- package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterWizard/OperatorsSelect.d.ts +9 -0
- package/build/@types/ocm/components/clusterWizard/OperatorsSelect.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterWizard/OperatorsStep.d.ts +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts +1 -1
- package/build/@types/ocm/components/clusterWizard/wizardTransition.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/utils.d.ts +1 -5
- package/build/@types/ocm/components/clusters/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.d.ts.map +1 -1
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts +1 -8
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
- package/build/@types/ocm/components/utils.d.ts +0 -2
- package/build/@types/ocm/components/utils.d.ts.map +1 -1
- package/build/@types/ocm/services/OperatorsService.d.ts +1 -10
- package/build/@types/ocm/services/OperatorsService.d.ts.map +1 -1
- package/build/cjs/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.js +2 -1
- package/build/cjs/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +3 -7
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/common/components/clusterDetail/ClusterProgressItems.js +1 -1
- package/build/cjs/common/components/clusterDetail/ClusterProgressItems.js.map +1 -1
- package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js +7 -8
- package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js.map +1 -1
- package/build/cjs/common/components/operators/operatorSpecs.js +215 -0
- package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -0
- package/build/cjs/common/config/constants.js +6 -87
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/selectors/clusterSelectors.js.map +1 -1
- package/build/cjs/common/types/clusters.js.map +1 -1
- package/build/cjs/common/utils.js +6 -1
- package/build/cjs/common/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageModal.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterProgressItems.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterProgressItems.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js +6 -8
- package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js +91 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/bundleSpecs.js +39 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/bundleSpecs.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js +54 -19
- package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js +24 -18
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js +1 -6
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js +3 -21
- package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/Operators.js +11 -38
- package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.css +6 -0
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js +123 -0
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -0
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js +63 -0
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js.map +1 -0
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +25 -272
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js +1 -4
- package/build/cjs/ocm/components/clusterWizard/wizardTransition.js.map +1 -1
- package/build/cjs/ocm/components/clusters/utils.js +1 -14
- package/build/cjs/ocm/components/clusters/utils.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.js +0 -1
- package/build/cjs/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +29 -78
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
- package/build/cjs/ocm/components/utils.js +1 -10
- package/build/cjs/ocm/components/utils.js.map +1 -1
- package/build/cjs/ocm/services/OperatorsService.js +4 -64
- package/build/cjs/ocm/services/OperatorsService.js.map +1 -1
- package/lib/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.tsx +2 -1
- package/lib/cim/components/helpers/versions.ts +1 -5
- package/lib/common/components/clusterDetail/ClusterProgressItems.tsx +1 -4
- package/lib/common/components/clusterDetail/OperatorsProgressItem.tsx +6 -12
- package/lib/common/components/clusterWizard/types.ts +3 -3
- package/lib/common/components/newFeatureSupportLevels/types.ts +4 -1
- package/lib/common/components/operators/operatorSpecs.tsx +343 -0
- package/lib/common/config/constants.ts +5 -99
- package/lib/common/selectors/clusterSelectors.ts +1 -2
- package/lib/common/types/clusters.ts +3 -23
- package/lib/common/utils.ts +5 -0
- package/lib/ocm/components/clusterConfiguration/DiscoveryImageModal.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/OcmClusterProgressItems.tsx +1 -4
- package/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx +5 -10
- package/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx +209 -0
- package/lib/ocm/components/clusterConfiguration/operators/bundleSpecs.tsx +64 -0
- package/lib/ocm/components/clusterConfiguration/operators/utils.tsx +88 -31
- package/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx +46 -43
- package/lib/ocm/components/clusterConfiguration/review/ReviewSummary.tsx +1 -15
- package/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx +3 -36
- package/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +0 -1
- package/lib/ocm/components/clusterWizard/Operators.tsx +17 -77
- package/lib/ocm/components/clusterWizard/OperatorsBundle.css +6 -0
- package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +245 -0
- package/lib/ocm/components/clusterWizard/OperatorsSelect.tsx +108 -0
- package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +38 -445
- package/lib/ocm/components/clusterWizard/wizardTransition.ts +0 -4
- package/lib/ocm/components/clusters/utils.ts +0 -19
- package/lib/ocm/components/featureSupportLevels/FeatureSupportLevelProvider.tsx +0 -1
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +33 -86
- package/lib/ocm/components/utils.ts +0 -12
- package/lib/ocm/services/OperatorsService.tsx +1 -100
- package/package.json +3 -3
- package/build/@types/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/CnvCheckbox.d.ts +0 -11
- package/build/@types/ocm/components/clusterConfiguration/operators/CnvCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/CnvHostRequirements.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/CnvHostRequirements.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/FenceAgentsRemediationCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/FenceAgentsRemediationCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/KmmCheckbox.d.ts +0 -6
- package/build/@types/ocm/components/clusterConfiguration/operators/KmmCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/KubeDeschedulerCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/KubeDeschedulerCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/LsoCheckbox.d.ts +0 -9
- package/build/@types/ocm/components/clusterConfiguration/operators/LsoCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/LvmCheckbox.d.ts +0 -11
- package/build/@types/ocm/components/clusterConfiguration/operators/LvmCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/LvmHostRequirements.d.ts +0 -7
- package/build/@types/ocm/components/clusterConfiguration/operators/LvmHostRequirements.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/MceCheckbox.d.ts +0 -12
- package/build/@types/ocm/components/clusterConfiguration/operators/MceCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/MceRequirements.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/MceRequirements.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.d.ts +0 -10
- package/build/@types/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/MtvRequirements.d.ts +0 -7
- package/build/@types/ocm/components/clusterConfiguration/operators/MtvRequirements.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/NmstateCheckbox.d.ts +0 -11
- package/build/@types/ocm/components/clusterConfiguration/operators/NmstateCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/NmstateRequirements.d.ts +0 -7
- package/build/@types/ocm/components/clusterConfiguration/operators/NmstateRequirements.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.d.ts +0 -9
- package/build/@types/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/NodeHealthcheckCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/NodeHealthcheckCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/NodeMaintenanceOperatorCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/NodeMaintenanceOperatorCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.d.ts +0 -9
- package/build/@types/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OdfCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/OdfCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.d.ts +0 -4
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.d.ts +0 -4
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenshiftAINvidiaRequirements.d.ts +0 -4
- package/build/@types/ocm/components/clusterConfiguration/operators/OpenshiftAINvidiaRequirements.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/OscCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/PipelinesChekbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/PipelinesChekbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/SelfNodeRemediationCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/SelfNodeRemediationCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.d.ts +0 -8
- package/build/@types/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.d.ts +0 -9
- package/build/@types/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/SupportedOperators.d.ts +0 -24
- package/build/@types/ocm/components/clusterConfiguration/operators/SupportedOperators.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/VirtualizationRequirements.d.ts +0 -4
- package/build/@types/ocm/components/clusterConfiguration/operators/VirtualizationRequirements.d.ts.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.js +0 -29
- package/build/cjs/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.js +0 -33
- package/build/cjs/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js +0 -45
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvHostRequirements.js +0 -55
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvHostRequirements.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/FenceAgentsRemediationCheckbox.js +0 -34
- package/build/cjs/ocm/components/clusterConfiguration/operators/FenceAgentsRemediationCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/KmmCheckbox.js +0 -40
- package/build/cjs/ocm/components/clusterConfiguration/operators/KmmCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/KubeDeschedulerCheckbox.js +0 -34
- package/build/cjs/ocm/components/clusterConfiguration/operators/KubeDeschedulerCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/LsoCheckbox.js +0 -33
- package/build/cjs/ocm/components/clusterConfiguration/operators/LsoCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/LvmCheckbox.js +0 -44
- package/build/cjs/ocm/components/clusterConfiguration/operators/LvmCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/LvmHostRequirements.js +0 -22
- package/build/cjs/ocm/components/clusterConfiguration/operators/LvmHostRequirements.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/MceCheckbox.js +0 -35
- package/build/cjs/ocm/components/clusterConfiguration/operators/MceCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/MceRequirements.js +0 -54
- package/build/cjs/ocm/components/clusterConfiguration/operators/MceRequirements.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js +0 -43
- package/build/cjs/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/MtvRequirements.js +0 -51
- package/build/cjs/ocm/components/clusterConfiguration/operators/MtvRequirements.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/NmstateCheckbox.js +0 -35
- package/build/cjs/ocm/components/clusterConfiguration/operators/NmstateCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/NmstateRequirements.js +0 -48
- package/build/cjs/ocm/components/clusterConfiguration/operators/NmstateRequirements.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.js +0 -33
- package/build/cjs/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/NodeHealthcheckCheckbox.js +0 -34
- package/build/cjs/ocm/components/clusterConfiguration/operators/NodeHealthcheckCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/NodeMaintenanceOperatorCheckbox.js +0 -34
- package/build/cjs/ocm/components/clusterConfiguration/operators/NodeMaintenanceOperatorCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.js +0 -34
- package/build/cjs/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OdfCheckbox.js +0 -43
- package/build/cjs/ocm/components/clusterConfiguration/operators/OdfCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js +0 -35
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.js +0 -19
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.js +0 -32
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenshiftAINvidiaRequirements.js +0 -31
- package/build/cjs/ocm/components/clusterConfiguration/operators/OpenshiftAINvidiaRequirements.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js +0 -38
- package/build/cjs/ocm/components/clusterConfiguration/operators/OscCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/PipelinesChekbox.js +0 -33
- package/build/cjs/ocm/components/clusterConfiguration/operators/PipelinesChekbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/SelfNodeRemediationCheckbox.js +0 -34
- package/build/cjs/ocm/components/clusterConfiguration/operators/SelfNodeRemediationCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.js +0 -33
- package/build/cjs/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.js +0 -33
- package/build/cjs/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/SupportedOperators.js +0 -101
- package/build/cjs/ocm/components/clusterConfiguration/operators/SupportedOperators.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/VirtualizationRequirements.js +0 -26
- package/build/cjs/ocm/components/clusterConfiguration/operators/VirtualizationRequirements.js.map +0 -1
- package/lib/ocm/components/clusterConfiguration/operators/AmdGpuCheckbox.tsx +0 -64
- package/lib/ocm/components/clusterConfiguration/operators/AuthorinoCheckbox.tsx +0 -63
- package/lib/ocm/components/clusterConfiguration/operators/CnvCheckbox.tsx +0 -105
- package/lib/ocm/components/clusterConfiguration/operators/CnvHostRequirements.tsx +0 -64
- package/lib/ocm/components/clusterConfiguration/operators/FenceAgentsRemediationCheckbox.tsx +0 -71
- package/lib/ocm/components/clusterConfiguration/operators/KmmCheckbox.tsx +0 -69
- package/lib/ocm/components/clusterConfiguration/operators/KubeDeschedulerCheckbox.tsx +0 -66
- package/lib/ocm/components/clusterConfiguration/operators/LsoCheckbox.tsx +0 -64
- package/lib/ocm/components/clusterConfiguration/operators/LvmCheckbox.tsx +0 -112
- package/lib/ocm/components/clusterConfiguration/operators/LvmHostRequirements.tsx +0 -38
- package/lib/ocm/components/clusterConfiguration/operators/MceCheckbox.tsx +0 -90
- package/lib/ocm/components/clusterConfiguration/operators/MceRequirements.tsx +0 -61
- package/lib/ocm/components/clusterConfiguration/operators/MtvOperatorCheckbox.tsx +0 -94
- package/lib/ocm/components/clusterConfiguration/operators/MtvRequirements.tsx +0 -52
- package/lib/ocm/components/clusterConfiguration/operators/NmstateCheckbox.tsx +0 -82
- package/lib/ocm/components/clusterConfiguration/operators/NmstateRequirements.tsx +0 -53
- package/lib/ocm/components/clusterConfiguration/operators/NodeFeatureDiscoveryCheckbox.tsx +0 -73
- package/lib/ocm/components/clusterConfiguration/operators/NodeHealthcheckCheckbox.tsx +0 -66
- package/lib/ocm/components/clusterConfiguration/operators/NodeMaintenanceOperatorCheckbox.tsx +0 -66
- package/lib/ocm/components/clusterConfiguration/operators/NvidiaGpuCheckbox.tsx +0 -70
- package/lib/ocm/components/clusterConfiguration/operators/OdfCheckbox.tsx +0 -82
- package/lib/ocm/components/clusterConfiguration/operators/OpenShiftAICheckbox.tsx +0 -67
- package/lib/ocm/components/clusterConfiguration/operators/OpenShiftAIRequirements.tsx +0 -22
- package/lib/ocm/components/clusterConfiguration/operators/OpenshiftAIAmdRequirements.tsx +0 -36
- package/lib/ocm/components/clusterConfiguration/operators/OpenshiftAINvidiaRequirements.tsx +0 -37
- package/lib/ocm/components/clusterConfiguration/operators/OscCheckbox.tsx +0 -73
- package/lib/ocm/components/clusterConfiguration/operators/PipelinesChekbox.tsx +0 -63
- package/lib/ocm/components/clusterConfiguration/operators/SelfNodeRemediationCheckbox.tsx +0 -68
- package/lib/ocm/components/clusterConfiguration/operators/ServerlessCheckbox.tsx +0 -62
- package/lib/ocm/components/clusterConfiguration/operators/ServicemeshCheckbox.tsx +0 -64
- package/lib/ocm/components/clusterConfiguration/operators/SupportedOperators.tsx +0 -140
- package/lib/ocm/components/clusterConfiguration/operators/VirtualizationRequirements.tsx +0 -35
|
@@ -2,33 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import { useDispatch } from 'react-redux';
|
|
3
3
|
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
|
|
4
4
|
import { Formik, FormikConfig, useFormikContext } from 'formik';
|
|
5
|
+
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
5
6
|
import {
|
|
6
7
|
ClusterWizardStep,
|
|
7
8
|
getFormikErrorFields,
|
|
8
|
-
OPERATOR_NAME_AMD_GPU,
|
|
9
|
-
OPERATOR_NAME_AUTHORINO,
|
|
10
|
-
OPERATOR_NAME_CNV,
|
|
11
|
-
OPERATOR_NAME_KMM,
|
|
12
|
-
OPERATOR_NAME_LSO,
|
|
13
|
-
OPERATOR_NAME_LVM,
|
|
14
|
-
OPERATOR_NAME_MCE,
|
|
15
|
-
OPERATOR_NAME_MTV,
|
|
16
|
-
OPERATOR_NAME_NMSTATE,
|
|
17
|
-
OPERATOR_NAME_NODE_FEATURE_DISCOVERY,
|
|
18
|
-
OPERATOR_NAME_NVIDIA_GPU,
|
|
19
|
-
OPERATOR_NAME_ODF,
|
|
20
|
-
OPERATOR_NAME_OPENSHIFT_AI,
|
|
21
|
-
OPERATOR_NAME_OSC,
|
|
22
|
-
OPERATOR_NAME_PIPELINES,
|
|
23
|
-
OPERATOR_NAME_SERVERLESS,
|
|
24
|
-
OPERATOR_NAME_SERVICEMESH,
|
|
25
|
-
OPERATOR_NAME_NODE_HEALTHCHECK,
|
|
26
|
-
OPERATOR_NAME_SELF_NODE_REMEDIATION,
|
|
27
|
-
OPERATOR_NAME_FENCE_AGENTS_REMEDIATION,
|
|
28
|
-
OPERATOR_NAME_NODE_MAINTENANCE,
|
|
29
|
-
OPERATOR_NAME_KUBE_DESCHEDULER,
|
|
30
9
|
OperatorsValues,
|
|
31
|
-
|
|
10
|
+
selectOlmOperators,
|
|
11
|
+
UISettingsValues,
|
|
32
12
|
useAlerts,
|
|
33
13
|
useFormikAutoSave,
|
|
34
14
|
} from '../../../common';
|
|
@@ -36,40 +16,18 @@ import { useClusterWizardContext } from './ClusterWizardContext';
|
|
|
36
16
|
import ClusterWizardFooter from '../clusterWizard/ClusterWizardFooter';
|
|
37
17
|
import ClusterWizardNavigation from '../clusterWizard/ClusterWizardNavigation';
|
|
38
18
|
import { OperatorsStep } from './OperatorsStep';
|
|
39
|
-
import { ClustersService
|
|
19
|
+
import { ClustersService } from '../../services';
|
|
40
20
|
import { setServerUpdateError, updateCluster } from '../../store/slices/current-cluster/slice';
|
|
41
21
|
import { getApiErrorMessage, handleApiError, isUnknownServerError } from '../../../common/api';
|
|
42
22
|
import { canNextOperators } from './wizardTransition';
|
|
43
|
-
import { Cluster, MonitoredOperator } from '@openshift-assisted/types/assisted-installer-service';
|
|
44
23
|
|
|
45
|
-
|
|
46
|
-
|
|
24
|
+
const getOperatorsInitialValues = (
|
|
25
|
+
uiSettings: UISettingsValues | undefined,
|
|
26
|
+
cluster: Cluster,
|
|
47
27
|
): OperatorsValues => {
|
|
48
|
-
const isOperatorEnabled = (operatorNames: string[]) =>
|
|
49
|
-
!!monitoredOperators.find((operator) => operatorNames.includes(operator.name || ''));
|
|
50
28
|
return {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
useContainerNativeVirtualization: isOperatorEnabled([OPERATOR_NAME_CNV]),
|
|
54
|
-
useMultiClusterEngine: isOperatorEnabled([OPERATOR_NAME_MCE]),
|
|
55
|
-
useMigrationToolkitforVirtualization: isOperatorEnabled([OPERATOR_NAME_MTV]),
|
|
56
|
-
useOpenShiftAI: isOperatorEnabled([OPERATOR_NAME_OPENSHIFT_AI]),
|
|
57
|
-
useOsc: isOperatorEnabled([OPERATOR_NAME_OSC]),
|
|
58
|
-
useNodeFeatureDiscovery: isOperatorEnabled([OPERATOR_NAME_NODE_FEATURE_DISCOVERY]),
|
|
59
|
-
useNmstate: isOperatorEnabled([OPERATOR_NAME_NMSTATE]),
|
|
60
|
-
useLso: isOperatorEnabled([OPERATOR_NAME_LSO]),
|
|
61
|
-
useServerless: isOperatorEnabled([OPERATOR_NAME_SERVERLESS]),
|
|
62
|
-
useAuthorino: isOperatorEnabled([OPERATOR_NAME_AUTHORINO]),
|
|
63
|
-
usePipelines: isOperatorEnabled([OPERATOR_NAME_PIPELINES]),
|
|
64
|
-
useServicemesh: isOperatorEnabled([OPERATOR_NAME_SERVICEMESH]),
|
|
65
|
-
useNvidiaGpu: isOperatorEnabled([OPERATOR_NAME_NVIDIA_GPU]),
|
|
66
|
-
useAmdGpu: isOperatorEnabled([OPERATOR_NAME_AMD_GPU]),
|
|
67
|
-
useKmm: isOperatorEnabled([OPERATOR_NAME_KMM]),
|
|
68
|
-
useNodeHealthcheck: isOperatorEnabled([OPERATOR_NAME_NODE_HEALTHCHECK]),
|
|
69
|
-
useSelfNodeRemediation: isOperatorEnabled([OPERATOR_NAME_SELF_NODE_REMEDIATION]),
|
|
70
|
-
useFenceAgentsRemediation: isOperatorEnabled([OPERATOR_NAME_FENCE_AGENTS_REMEDIATION]),
|
|
71
|
-
useNodeMaintenance: isOperatorEnabled([OPERATOR_NAME_NODE_MAINTENANCE]),
|
|
72
|
-
useKubeDescheduler: isOperatorEnabled([OPERATOR_NAME_KUBE_DESCHEDULER]),
|
|
29
|
+
selectedBundles: uiSettings?.bundlesSelected || [],
|
|
30
|
+
selectedOperators: selectOlmOperators(cluster).map((o) => o.name || ''),
|
|
73
31
|
};
|
|
74
32
|
};
|
|
75
33
|
|
|
@@ -110,47 +68,29 @@ const OperatorsForm = ({ cluster }: { cluster: Cluster }) => {
|
|
|
110
68
|
/>
|
|
111
69
|
}
|
|
112
70
|
>
|
|
113
|
-
<OperatorsStep
|
|
114
|
-
clusterId={cluster.id}
|
|
115
|
-
openshiftVersion={cluster.openshiftVersion}
|
|
116
|
-
monitoredOperators={cluster.monitoredOperators}
|
|
117
|
-
/>
|
|
71
|
+
<OperatorsStep cluster={cluster} />
|
|
118
72
|
</ClusterWizardStep>
|
|
119
73
|
);
|
|
120
74
|
};
|
|
121
75
|
|
|
122
76
|
const Operators = ({ cluster }: { cluster: Cluster }) => {
|
|
123
77
|
const dispatch = useDispatch();
|
|
78
|
+
const { updateUISettings, uiSettings } = useClusterWizardContext();
|
|
124
79
|
const { addAlert, clearAlerts } = useAlerts();
|
|
125
80
|
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
const initialValues = React.useMemo(
|
|
129
|
-
() => getOperatorsInitialValues(olmOperators),
|
|
130
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
131
|
-
[], // just once, Formik does not reinitialize
|
|
132
|
-
);
|
|
133
|
-
|
|
134
|
-
const handleSubmit: FormikConfig<OperatorsValues>['onSubmit'] = async (
|
|
135
|
-
values,
|
|
136
|
-
{ setFieldValue },
|
|
137
|
-
) => {
|
|
81
|
+
const handleSubmit: FormikConfig<OperatorsValues>['onSubmit'] = async (values) => {
|
|
138
82
|
clearAlerts();
|
|
139
83
|
|
|
140
|
-
const enabledOperators =
|
|
84
|
+
const enabledOperators = values.selectedOperators.map((so) => ({
|
|
85
|
+
name: so,
|
|
86
|
+
}));
|
|
141
87
|
|
|
142
88
|
try {
|
|
143
89
|
const { data: updatedCluster } = await ClustersService.update(cluster.id, cluster.tags, {
|
|
144
90
|
olmOperators: enabledOperators,
|
|
145
91
|
});
|
|
146
92
|
|
|
147
|
-
|
|
148
|
-
enabledOperators,
|
|
149
|
-
updatedCluster.monitoredOperators,
|
|
150
|
-
);
|
|
151
|
-
Object.keys(needSyncOperators).forEach((operatorName) => {
|
|
152
|
-
setFieldValue(operatorName, true);
|
|
153
|
-
});
|
|
93
|
+
await updateUISettings({ bundlesSelected: values.selectedBundles });
|
|
154
94
|
|
|
155
95
|
dispatch(updateCluster(updatedCluster));
|
|
156
96
|
} catch (e) {
|
|
@@ -164,7 +104,7 @@ const Operators = ({ cluster }: { cluster: Cluster }) => {
|
|
|
164
104
|
};
|
|
165
105
|
|
|
166
106
|
return (
|
|
167
|
-
<Formik initialValues={
|
|
107
|
+
<Formik initialValues={getOperatorsInitialValues(uiSettings, cluster)} onSubmit={handleSubmit}>
|
|
168
108
|
<OperatorsForm cluster={cluster} />
|
|
169
109
|
</Formik>
|
|
170
110
|
);
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Card,
|
|
4
|
+
CardBody,
|
|
5
|
+
CardHeader,
|
|
6
|
+
CardTitle,
|
|
7
|
+
Gallery,
|
|
8
|
+
GalleryItem,
|
|
9
|
+
List,
|
|
10
|
+
ListItem,
|
|
11
|
+
Split,
|
|
12
|
+
SplitItem,
|
|
13
|
+
Stack,
|
|
14
|
+
StackItem,
|
|
15
|
+
Title,
|
|
16
|
+
Tooltip,
|
|
17
|
+
} from '@patternfly/react-core';
|
|
18
|
+
import {
|
|
19
|
+
Bundle,
|
|
20
|
+
PreflightHardwareRequirements,
|
|
21
|
+
} from '@openshift-assisted/types/assisted-installer-service';
|
|
22
|
+
import NewFeatureSupportLevelBadge, {
|
|
23
|
+
NewSupportLevelBadgeProps,
|
|
24
|
+
} from '../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
|
|
25
|
+
import { ExternalLink, OperatorsValues, PopoverIcon, singleClusterBundles } from '../../../common';
|
|
26
|
+
import { useFormikContext } from 'formik';
|
|
27
|
+
import {
|
|
28
|
+
GetFeatureSupportLevel,
|
|
29
|
+
useNewFeatureSupportLevel,
|
|
30
|
+
} from '../../../common/components/newFeatureSupportLevels';
|
|
31
|
+
import { useFeature } from '../../hooks/use-feature';
|
|
32
|
+
import { useSelector } from 'react-redux';
|
|
33
|
+
import { selectIsCurrentClusterSNO } from '../../store/slices/current-cluster/selectors';
|
|
34
|
+
import { getNewBundleOperators } from '../clusterConfiguration/operators/utils';
|
|
35
|
+
import { bundleSpecs } from '../clusterConfiguration/operators/bundleSpecs';
|
|
36
|
+
import { useOperatorSpecs } from '../../../common/components/operators/operatorSpecs';
|
|
37
|
+
|
|
38
|
+
import './OperatorsBundle.css';
|
|
39
|
+
|
|
40
|
+
const BundleLabel = ({ bundle }: { bundle: Bundle }) => {
|
|
41
|
+
const opSpecs = useOperatorSpecs();
|
|
42
|
+
const bundleSpec = bundleSpecs[bundle.id || ''];
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<>
|
|
46
|
+
<span>{bundle.title} </span>
|
|
47
|
+
<PopoverIcon
|
|
48
|
+
component={'a'}
|
|
49
|
+
headerContent={<div>Requirements and dependencies</div>}
|
|
50
|
+
bodyContent={
|
|
51
|
+
<Stack hasGutter>
|
|
52
|
+
{bundleSpec?.Description && (
|
|
53
|
+
<StackItem>
|
|
54
|
+
<bundleSpec.Description />
|
|
55
|
+
</StackItem>
|
|
56
|
+
)}
|
|
57
|
+
{bundle.operators?.length && (
|
|
58
|
+
<>
|
|
59
|
+
<StackItem>Bundle operators:</StackItem>
|
|
60
|
+
<StackItem>
|
|
61
|
+
<List>
|
|
62
|
+
{bundle.operators.map((op) => (
|
|
63
|
+
<ListItem key={op}>{opSpecs[op]?.title || op}</ListItem>
|
|
64
|
+
))}
|
|
65
|
+
</List>
|
|
66
|
+
</StackItem>
|
|
67
|
+
</>
|
|
68
|
+
)}
|
|
69
|
+
{bundleSpec?.docsLink && (
|
|
70
|
+
<StackItem>
|
|
71
|
+
<ExternalLink href={bundleSpec.docsLink}>Learn more</ExternalLink>
|
|
72
|
+
</StackItem>
|
|
73
|
+
)}
|
|
74
|
+
</Stack>
|
|
75
|
+
}
|
|
76
|
+
/>
|
|
77
|
+
</>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const getBundleSupportLevel = (
|
|
82
|
+
bundle: Bundle,
|
|
83
|
+
opSpecs: ReturnType<typeof useOperatorSpecs>,
|
|
84
|
+
getFeatureSupportLevel: GetFeatureSupportLevel,
|
|
85
|
+
): NewSupportLevelBadgeProps['supportLevel'] => {
|
|
86
|
+
let supportLevel: NewSupportLevelBadgeProps['supportLevel'] = undefined;
|
|
87
|
+
if (bundle.operators) {
|
|
88
|
+
for (const op of bundle.operators) {
|
|
89
|
+
const operatorSpec = opSpecs[op];
|
|
90
|
+
if (operatorSpec) {
|
|
91
|
+
const opSupportLevel = getFeatureSupportLevel(operatorSpec.featureId);
|
|
92
|
+
if (opSupportLevel === 'dev-preview') {
|
|
93
|
+
supportLevel = 'dev-preview';
|
|
94
|
+
break;
|
|
95
|
+
} else if (opSupportLevel === 'tech-preview') {
|
|
96
|
+
supportLevel = 'tech-preview';
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return supportLevel;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const BundleCard = ({
|
|
105
|
+
bundle,
|
|
106
|
+
bundles,
|
|
107
|
+
preflightRequirements,
|
|
108
|
+
}: {
|
|
109
|
+
bundle: Bundle;
|
|
110
|
+
bundles: Bundle[];
|
|
111
|
+
preflightRequirements: PreflightHardwareRequirements | undefined;
|
|
112
|
+
}) => {
|
|
113
|
+
const { values, setFieldValue } = useFormikContext<OperatorsValues>();
|
|
114
|
+
const isSNO = useSelector(selectIsCurrentClusterSNO);
|
|
115
|
+
const { isFeatureSupported, getFeatureSupportLevel } = useNewFeatureSupportLevel();
|
|
116
|
+
const opSpecs = useOperatorSpecs();
|
|
117
|
+
|
|
118
|
+
const supportLevel = getBundleSupportLevel(bundle, opSpecs, getFeatureSupportLevel);
|
|
119
|
+
|
|
120
|
+
const hasUnsupportedOperators = !!bundle.operators?.some((op) => {
|
|
121
|
+
const operatorSpec = opSpecs[op];
|
|
122
|
+
if (!operatorSpec) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
return !isFeatureSupported(operatorSpec.featureId);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
const bundleSpec = bundleSpecs[bundle.id || ''];
|
|
129
|
+
|
|
130
|
+
const incompatibleBundle = bundleSpec?.incompatibleBundles?.find((b) =>
|
|
131
|
+
values.selectedBundles.includes(b),
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
const disabledReason = hasUnsupportedOperators
|
|
135
|
+
? 'Some operators in this bundle are not supported with the current configuration.'
|
|
136
|
+
: isSNO && bundleSpec?.noSNO
|
|
137
|
+
? 'This bundle is not available when deploying a Single Node OpenShift.'
|
|
138
|
+
: incompatibleBundle
|
|
139
|
+
? `Bundle cannot be installed together with ${
|
|
140
|
+
bundles.find(({ id }) => id === incompatibleBundle)?.title || incompatibleBundle
|
|
141
|
+
}`
|
|
142
|
+
: undefined;
|
|
143
|
+
|
|
144
|
+
const onSelect = (checked: boolean) => {
|
|
145
|
+
const newBundles = checked
|
|
146
|
+
? [...values.selectedBundles, bundle.id || '']
|
|
147
|
+
: values.selectedBundles.filter((sb) => sb !== bundle.id);
|
|
148
|
+
setFieldValue('selectedBundles', newBundles);
|
|
149
|
+
const newOperators = getNewBundleOperators(
|
|
150
|
+
values.selectedOperators,
|
|
151
|
+
newBundles,
|
|
152
|
+
bundles,
|
|
153
|
+
bundle,
|
|
154
|
+
preflightRequirements,
|
|
155
|
+
checked,
|
|
156
|
+
);
|
|
157
|
+
setFieldValue('selectedOperators', newOperators);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const isSelected = values.selectedBundles.includes(bundle.id || '');
|
|
161
|
+
const checkboxId = `bundle-${bundle.id || ''}`;
|
|
162
|
+
return (
|
|
163
|
+
<Tooltip content={disabledReason} hidden={!disabledReason}>
|
|
164
|
+
<Card
|
|
165
|
+
isDisabled={!!disabledReason}
|
|
166
|
+
isFullHeight
|
|
167
|
+
isSelectable
|
|
168
|
+
isSelected={isSelected}
|
|
169
|
+
className="ai-bundle-card"
|
|
170
|
+
>
|
|
171
|
+
<CardHeader
|
|
172
|
+
selectableActions={{
|
|
173
|
+
selectableActionId: checkboxId,
|
|
174
|
+
selectableActionAriaLabelledby: checkboxId,
|
|
175
|
+
name: checkboxId,
|
|
176
|
+
onChange: (_, checked) => onSelect(checked),
|
|
177
|
+
isChecked: isSelected,
|
|
178
|
+
}}
|
|
179
|
+
>
|
|
180
|
+
<CardTitle>
|
|
181
|
+
<BundleLabel bundle={bundle} />
|
|
182
|
+
</CardTitle>
|
|
183
|
+
</CardHeader>
|
|
184
|
+
<CardBody isFilled>
|
|
185
|
+
<Stack hasGutter>
|
|
186
|
+
<StackItem isFilled>
|
|
187
|
+
<div>{bundle.description}</div>
|
|
188
|
+
</StackItem>
|
|
189
|
+
{bundleSpec.featureId && (
|
|
190
|
+
<StackItem>
|
|
191
|
+
<Split>
|
|
192
|
+
<SplitItem isFilled />
|
|
193
|
+
<SplitItem>
|
|
194
|
+
<NewFeatureSupportLevelBadge
|
|
195
|
+
featureId={bundleSpec.featureId}
|
|
196
|
+
supportLevel={supportLevel}
|
|
197
|
+
/>
|
|
198
|
+
</SplitItem>
|
|
199
|
+
</Split>
|
|
200
|
+
</StackItem>
|
|
201
|
+
)}
|
|
202
|
+
</Stack>
|
|
203
|
+
</CardBody>
|
|
204
|
+
</Card>
|
|
205
|
+
</Tooltip>
|
|
206
|
+
);
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const OperatorsBundle = ({
|
|
210
|
+
bundles,
|
|
211
|
+
preflightRequirements,
|
|
212
|
+
}: {
|
|
213
|
+
bundles: Bundle[];
|
|
214
|
+
preflightRequirements: PreflightHardwareRequirements | undefined;
|
|
215
|
+
}) => {
|
|
216
|
+
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
217
|
+
|
|
218
|
+
return (
|
|
219
|
+
<Stack hasGutter>
|
|
220
|
+
<StackItem>
|
|
221
|
+
<Title headingLevel="h2" size="lg">
|
|
222
|
+
Bundles
|
|
223
|
+
</Title>
|
|
224
|
+
</StackItem>
|
|
225
|
+
<StackItem>
|
|
226
|
+
<Gallery hasGutter minWidths={{ default: '350px' }}>
|
|
227
|
+
{(isSingleClusterFeatureEnabled
|
|
228
|
+
? bundles.filter((b) => b.id && singleClusterBundles.includes(b.id))
|
|
229
|
+
: bundles
|
|
230
|
+
).map((bundle) => (
|
|
231
|
+
<GalleryItem key={bundle.id}>
|
|
232
|
+
<BundleCard
|
|
233
|
+
bundle={bundle}
|
|
234
|
+
bundles={bundles}
|
|
235
|
+
preflightRequirements={preflightRequirements}
|
|
236
|
+
/>
|
|
237
|
+
</GalleryItem>
|
|
238
|
+
))}
|
|
239
|
+
</Gallery>
|
|
240
|
+
</StackItem>
|
|
241
|
+
</Stack>
|
|
242
|
+
);
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export default OperatorsBundle;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ExpandableSection, Stack, StackItem } from '@patternfly/react-core';
|
|
3
|
+
import {
|
|
4
|
+
Bundle,
|
|
5
|
+
Cluster,
|
|
6
|
+
PreflightHardwareRequirements,
|
|
7
|
+
} from '@openshift-assisted/types/assisted-installer-service';
|
|
8
|
+
import { useFormikContext } from 'formik';
|
|
9
|
+
import {
|
|
10
|
+
getApiErrorMessage,
|
|
11
|
+
handleApiError,
|
|
12
|
+
LoadingState,
|
|
13
|
+
OperatorsValues,
|
|
14
|
+
singleClusterOperators,
|
|
15
|
+
useAlerts,
|
|
16
|
+
useStateSafely,
|
|
17
|
+
} from '../../../common';
|
|
18
|
+
import { OperatorsService } from '../../services';
|
|
19
|
+
import { useFeature } from '../../hooks/use-feature';
|
|
20
|
+
import OperatorCheckbox from '../clusterConfiguration/operators/OperatorCheckbox';
|
|
21
|
+
import { useOperatorSpecs } from '../../../common/components/operators/operatorSpecs';
|
|
22
|
+
|
|
23
|
+
const OperatorsSelect = ({
|
|
24
|
+
cluster,
|
|
25
|
+
bundles,
|
|
26
|
+
preflightRequirements,
|
|
27
|
+
}: {
|
|
28
|
+
cluster: Cluster;
|
|
29
|
+
bundles: Bundle[];
|
|
30
|
+
preflightRequirements: PreflightHardwareRequirements | undefined;
|
|
31
|
+
}) => {
|
|
32
|
+
const [isLoading, setIsLoading] = useStateSafely(true);
|
|
33
|
+
const { addAlert } = useAlerts();
|
|
34
|
+
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
35
|
+
const [supportedOperators, setSupportedOperators] = useStateSafely<string[]>([]);
|
|
36
|
+
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
37
|
+
const { values } = useFormikContext<OperatorsValues>();
|
|
38
|
+
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
const fetchSupportedOperators = async () => {
|
|
41
|
+
try {
|
|
42
|
+
const fetchedOperators = await OperatorsService.getSupportedOperators();
|
|
43
|
+
setSupportedOperators(fetchedOperators);
|
|
44
|
+
} catch (error) {
|
|
45
|
+
handleApiError(error, () =>
|
|
46
|
+
addAlert({ title: 'Failed to fetch operators', message: getApiErrorMessage(error) }),
|
|
47
|
+
);
|
|
48
|
+
} finally {
|
|
49
|
+
setIsLoading(false);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
void fetchSupportedOperators();
|
|
54
|
+
}, [addAlert, setSupportedOperators, setIsLoading]);
|
|
55
|
+
|
|
56
|
+
const opSpecs = useOperatorSpecs();
|
|
57
|
+
|
|
58
|
+
const operators = React.useMemo(() => {
|
|
59
|
+
return supportedOperators
|
|
60
|
+
.sort((a, b) => {
|
|
61
|
+
const aTitle = opSpecs[a]?.title || a;
|
|
62
|
+
const bTitle = opSpecs[b]?.title || b;
|
|
63
|
+
return aTitle.localeCompare(bTitle);
|
|
64
|
+
})
|
|
65
|
+
.filter((op) => {
|
|
66
|
+
if (!isSingleClusterFeatureEnabled) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
return singleClusterOperators.includes(op);
|
|
70
|
+
});
|
|
71
|
+
}, [isSingleClusterFeatureEnabled, supportedOperators, opSpecs]);
|
|
72
|
+
|
|
73
|
+
if (isLoading) {
|
|
74
|
+
return <LoadingState />;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<ExpandableSection
|
|
79
|
+
toggleText={`Single Operators (${operators.length} | ${values.selectedOperators.length} selected)`}
|
|
80
|
+
onToggle={() => setIsExpanded(!isExpanded)}
|
|
81
|
+
isExpanded={isExpanded}
|
|
82
|
+
data-testid="single-operators-section"
|
|
83
|
+
>
|
|
84
|
+
<Stack hasGutter data-testid={'operators-form'}>
|
|
85
|
+
{operators.map((operatorKey) => {
|
|
86
|
+
if (!opSpecs[operatorKey]) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<StackItem key={operatorKey}>
|
|
92
|
+
<OperatorCheckbox
|
|
93
|
+
bundles={bundles}
|
|
94
|
+
operatorId={operatorKey}
|
|
95
|
+
cluster={cluster}
|
|
96
|
+
openshiftVersion={cluster.openshiftVersion}
|
|
97
|
+
preflightRequirements={preflightRequirements}
|
|
98
|
+
{...opSpecs[operatorKey]}
|
|
99
|
+
/>
|
|
100
|
+
</StackItem>
|
|
101
|
+
);
|
|
102
|
+
})}
|
|
103
|
+
</Stack>
|
|
104
|
+
</ExpandableSection>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export default OperatorsSelect;
|