@openshift-assisted/ui-lib 2.9.5-cim → 2.9.7-cim
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/ACMClusterDeploymentDetailsStep.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts +2 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/types.d.ts +6 -3
- package/build/@types/cim/components/ClusterDeployment/types.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/AddHostDropdown.d.ts +1 -1
- package/build/@types/cim/components/InfraEnv/AddHostDropdown.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/types.d.ts +3 -1
- package/build/@types/cim/components/InfraEnv/types.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/toAssisted.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/build/@types/cim/components/modals/AddBmcHostModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/AddBmcHostYamlModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/ProvisioningConfigErrorAlert.d.ts +5 -0
- package/build/@types/cim/components/modals/ProvisioningConfigErrorAlert.d.ts.map +1 -0
- package/build/@types/cim/components/modals/types.d.ts +2 -0
- package/build/@types/cim/components/modals/types.d.ts.map +1 -1
- package/build/@types/common/api/assisted-service/ClustersAPI.d.ts +1 -3
- package/build/@types/common/api/assisted-service/ClustersAPI.d.ts.map +1 -1
- package/build/@types/common/api/axiosClient.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/ReviewValidations.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
- package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/validationsInfoUtils.d.ts +4 -0
- package/build/@types/common/components/clusterWizard/validationsInfoUtils.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/SingleNodeCheckbox.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/validationSchemas.d.ts +0 -1
- package/build/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/features/featureGate.d.ts +1 -2
- package/build/@types/common/features/featureGate.d.ts.map +1 -1
- package/build/@types/ocm/components/HostsClusterDetailTab/HostsClusterDetailTab.d.ts.map +1 -1
- package/build/@types/ocm/components/Routes.d.ts +6 -0
- package/build/@types/ocm/components/Routes.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmBaseDomainField.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.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/networkConfiguration/NetworkConfiguration.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/CnvHostRequirements.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts +13 -5
- package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegrationNote.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/platformIntegration/constants.d.ts +2 -2
- package/build/@types/ocm/components/clusterConfiguration/platformIntegration/constants.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/components/YamlView/MacIpMapping.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/AssistedInstallerDetailCard.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetailsForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/CustomManifestStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/StaticIp.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/AssistedInstallerHeader.d.ts +2 -0
- package/build/@types/ocm/components/clusters/AssistedInstallerHeader.d.ts.map +1 -0
- package/build/@types/ocm/components/clusters/ClusterPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/Clusters.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/ClustersTable.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/NewClusterPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/clusterPolling.d.ts +1 -1
- package/build/@types/ocm/components/clusters/clusterPolling.d.ts.map +1 -1
- package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
- package/build/@types/ocm/components/hosts/use-hosts-table.d.ts.map +1 -1
- package/build/@types/ocm/components/index.d.ts +1 -1
- package/build/@types/ocm/hooks/index.d.ts +0 -1
- package/build/@types/ocm/hooks/index.d.ts.map +1 -1
- package/build/@types/ocm/index.d.ts +0 -1
- package/build/@types/ocm/index.d.ts.map +1 -1
- package/build/@types/ocm/store/hooks.d.ts +5 -1
- package/build/@types/ocm/store/hooks.d.ts.map +1 -1
- package/build/@types/ocm/store/index.d.ts +5 -36
- package/build/@types/ocm/store/index.d.ts.map +1 -1
- package/build/@types/ocm/{selectors/clusters.d.ts → store/slices/clusters/selectors.d.ts} +15 -11
- package/build/@types/ocm/store/slices/clusters/selectors.d.ts.map +1 -0
- package/build/@types/ocm/{reducers/clusters/clustersSlice.d.ts → store/slices/clusters/slice.d.ts} +4 -4
- package/build/@types/ocm/store/slices/clusters/slice.d.ts.map +1 -0
- package/build/@types/ocm/store/slices/current-cluster/selectors.d.ts +14 -0
- package/build/@types/ocm/store/slices/current-cluster/selectors.d.ts.map +1 -0
- package/build/@types/ocm/{reducers/clusters/currentClusterSlice.d.ts → store/slices/current-cluster/slice.d.ts} +5 -5
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -0
- package/build/@types/ocm/store/slices/feature-flags/selectors.d.ts +9 -0
- package/build/@types/ocm/store/slices/feature-flags/selectors.d.ts.map +1 -0
- package/build/@types/ocm/store/slices/feature-flags/slice.d.ts +7 -0
- package/build/@types/ocm/store/slices/feature-flags/slice.d.ts.map +1 -0
- package/build/@types/ocm/store/slices/{infraEnvs → infra-envs}/selectors.d.ts +4 -3
- package/build/@types/ocm/store/slices/infra-envs/selectors.d.ts.map +1 -0
- package/build/@types/ocm/store/slices/infra-envs/slice.d.ts.map +1 -0
- package/build/@types/ocm/store/slices/infra-envs/thunks.d.ts.map +1 -0
- package/build/@types/ocm/store/store-day1.d.ts +32 -0
- package/build/@types/ocm/store/store-day1.d.ts.map +1 -0
- package/build/@types/ocm/store/store-day2.d.ts +10 -0
- package/build/@types/ocm/store/store-day2.d.ts.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js +3 -2
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +3 -3
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +5 -4
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.js +14 -9
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js +4 -4
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +4 -3
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/wizardTransition.js +9 -0
- package/build/cjs/cim/components/ClusterDeployment/wizardTransition.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/hooks/useSupportedOCPVersions.js +1 -1
- package/build/cjs/cim/components/Hypershift/hooks/useSupportedOCPVersions.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js +23 -10
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js.map +1 -1
- package/build/cjs/cim/components/helpers/toAssisted.js +2 -1
- package/build/cjs/cim/components/helpers/toAssisted.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +9 -2
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/cim/components/modals/AddBmcHostModal.js +3 -1
- package/build/cjs/cim/components/modals/AddBmcHostModal.js.map +1 -1
- package/build/cjs/cim/components/modals/AddBmcHostYamlModal.js +3 -1
- package/build/cjs/cim/components/modals/AddBmcHostYamlModal.js.map +1 -1
- package/build/cjs/cim/components/modals/ProvisioningConfigErrorAlert.js +16 -0
- package/build/cjs/cim/components/modals/ProvisioningConfigErrorAlert.js.map +1 -0
- package/build/cjs/common/api/assisted-service/ClustersAPI.js +0 -6
- package/build/cjs/common/api/assisted-service/ClustersAPI.js.map +1 -1
- package/build/cjs/common/api/axiosClient.js +2 -4
- package/build/cjs/common/api/axiosClient.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/ReviewValidations.js +11 -3
- package/build/cjs/common/components/clusterWizard/ReviewValidations.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js +2 -2
- package/build/cjs/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/validationsInfoUtils.js.map +1 -1
- package/build/cjs/common/components/ui/formik/SingleNodeCheckbox.js +1 -3
- package/build/cjs/common/components/ui/formik/SingleNodeCheckbox.js.map +1 -1
- package/build/cjs/common/components/ui/formik/validationSchemas.js +8 -16
- package/build/cjs/common/components/ui/formik/validationSchemas.js.map +1 -1
- package/build/cjs/common/config/constants.js +1 -3
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/features/featureGate.js +1 -11
- package/build/cjs/common/features/featureGate.js.map +1 -1
- package/build/cjs/common/utils.js +1 -1
- package/build/cjs/common/utils.js.map +1 -1
- package/build/cjs/ocm/components/HostsClusterDetailTab/HostsClusterDetailTab.js +9 -5
- package/build/cjs/ocm/components/HostsClusterDetailTab/HostsClusterDetailTab.js.map +1 -1
- package/build/cjs/ocm/components/Routes.js +29 -0
- package/build/cjs/ocm/components/Routes.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageForm.js +4 -4
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/HostInventory.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/HostInventory.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +2 -4
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.js +1 -2
- package/build/cjs/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsArray.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsArray.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js +8 -12
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.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/networkConfiguration/StackTypeControl.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvHostRequirements.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/CnvHostRequirements.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js +61 -18
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegrationNote.js +2 -2
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegrationNote.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/constants.js +8 -4
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/constants.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewStep.js +3 -3
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpHostsArray.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpHostsArray.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/YamlView/MacIpMapping.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/YamlView/MacIpMapping.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js +4 -4
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js +2 -2
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/CancelInstallationModal.js +2 -2
- package/build/cjs/ocm/components/clusterDetail/CancelInstallationModal.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterDetail.js +2 -2
- package/build/cjs/ocm/components/clusterDetail/ClusterDetail.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ResetClusterModal.js +2 -2
- package/build/cjs/ocm/components/clusterDetail/ResetClusterModal.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +10 -9
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js +4 -2
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/CustomManifestStep.js +1 -1
- package/build/cjs/ocm/components/clusterWizard/CustomManifestStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js +4 -4
- package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/Operators.js +3 -3
- package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js +4 -9
- package/build/cjs/ocm/components/clusterWizard/OperatorsStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/StaticIp.js +1 -1
- package/build/cjs/ocm/components/clusterWizard/StaticIp.js.map +1 -1
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js +18 -0
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js.map +1 -0
- package/build/cjs/ocm/components/clusters/ClusterPage.js +4 -9
- package/build/cjs/ocm/components/clusters/ClusterPage.js.map +1 -1
- package/build/cjs/ocm/components/clusters/Clusters.js +8 -8
- package/build/cjs/ocm/components/clusters/Clusters.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClustersListToolbar.js +6 -6
- package/build/cjs/ocm/components/clusters/ClustersListToolbar.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClustersTable.js +2 -2
- package/build/cjs/ocm/components/clusters/ClustersTable.js.map +1 -1
- package/build/cjs/ocm/components/clusters/NewClusterPage.js +2 -2
- package/build/cjs/ocm/components/clusters/NewClusterPage.js.map +1 -1
- package/build/cjs/ocm/components/clusters/clusterPolling.js +11 -11
- package/build/cjs/ocm/components/clusters/clusterPolling.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +20 -8
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
- package/build/cjs/ocm/components/hosts/HostsDiscoveryTable.js +1 -1
- package/build/cjs/ocm/components/hosts/HostsDiscoveryTable.js.map +1 -1
- package/build/cjs/ocm/components/hosts/use-hosts-table.js +20 -20
- package/build/cjs/ocm/components/hosts/use-hosts-table.js.map +1 -1
- package/build/cjs/ocm/components/hosts/utils.js +2 -2
- package/build/cjs/ocm/components/hosts/utils.js.map +1 -1
- package/build/cjs/ocm/components/index.js +1 -1
- package/build/cjs/ocm/components/ui/OcmFormFields.js +1 -1
- package/build/cjs/ocm/components/ui/OcmFormFields.js.map +1 -1
- package/build/cjs/ocm/hooks/index.js +1 -3
- package/build/cjs/ocm/hooks/index.js.map +1 -1
- package/build/cjs/ocm/hooks/useSetClusterPermissions.js +2 -2
- package/build/cjs/ocm/hooks/useSetClusterPermissions.js.map +1 -1
- package/build/cjs/ocm/index.js +1 -2
- package/build/cjs/ocm/index.js.map +1 -1
- package/build/cjs/ocm/store/hooks.js +3 -1
- package/build/cjs/ocm/store/hooks.js.map +1 -1
- package/build/cjs/ocm/store/index.js +10 -19
- package/build/cjs/ocm/store/index.js.map +1 -1
- package/build/cjs/ocm/{selectors/clusters.js → store/slices/clusters/selectors.js} +4 -4
- package/build/cjs/ocm/store/slices/clusters/selectors.js.map +1 -0
- package/build/cjs/ocm/{reducers/clusters/clustersSlice.js → store/slices/clusters/slice.js} +8 -7
- package/build/cjs/ocm/store/slices/clusters/slice.js.map +1 -0
- package/build/cjs/ocm/{selectors/currentCluster.js → store/slices/current-cluster/selectors.js} +1 -1
- package/build/cjs/ocm/store/slices/current-cluster/selectors.js.map +1 -0
- package/build/cjs/ocm/{reducers/clusters/currentClusterSlice.js → store/slices/current-cluster/slice.js} +12 -13
- package/build/cjs/ocm/store/slices/current-cluster/slice.js.map +1 -0
- package/build/cjs/ocm/store/slices/feature-flags/selectors.js +11 -0
- package/build/cjs/ocm/store/slices/feature-flags/selectors.js.map +1 -0
- package/build/cjs/ocm/store/slices/feature-flags/slice.js +16 -0
- package/build/cjs/ocm/store/slices/feature-flags/slice.js.map +1 -0
- package/build/cjs/ocm/store/slices/infra-envs/selectors.js.map +1 -0
- package/build/cjs/ocm/store/slices/infra-envs/slice.js.map +1 -0
- package/build/cjs/ocm/store/slices/infra-envs/thunks.js.map +1 -0
- package/build/cjs/ocm/store/store-day1.js +24 -0
- package/build/cjs/ocm/store/store-day1.js.map +1 -0
- package/build/cjs/ocm/store/store-day2.js +20 -0
- package/build/cjs/ocm/store/store-day2.js.map +1 -0
- package/lib/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.tsx +8 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +7 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +6 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.tsx +2 -0
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.tsx +14 -12
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.tsx +3 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.tsx +3 -0
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizard.tsx +4 -0
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +8 -2
- package/lib/cim/components/ClusterDeployment/types.ts +6 -3
- package/lib/cim/components/ClusterDeployment/wizardTransition.ts +10 -0
- package/lib/cim/components/Hypershift/hooks/useSupportedOCPVersions.ts +1 -1
- package/lib/cim/components/InfraEnv/AddHostDropdown.tsx +45 -18
- package/lib/cim/components/InfraEnv/types.ts +4 -1
- package/lib/cim/components/helpers/toAssisted.ts +3 -0
- package/lib/cim/components/helpers/versions.ts +8 -1
- package/lib/cim/components/modals/AddBmcHostModal.tsx +3 -0
- package/lib/cim/components/modals/AddBmcHostYamlModal.tsx +3 -0
- package/lib/cim/components/modals/ProvisioningConfigErrorAlert.tsx +18 -0
- package/lib/cim/components/modals/types.ts +2 -0
- package/lib/common/api/assisted-service/ClustersAPI.ts +0 -9
- package/lib/common/api/axiosClient.ts +2 -3
- package/lib/common/components/clusterWizard/ReviewValidations.tsx +12 -1
- package/lib/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.tsx +2 -2
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/clusterWizard/validationsInfoUtils.ts +9 -0
- package/lib/common/components/ui/formik/SingleNodeCheckbox.tsx +1 -3
- package/lib/common/components/ui/formik/validationSchemas.test.ts +4 -22
- package/lib/common/components/ui/formik/validationSchemas.ts +13 -22
- package/lib/common/config/constants.ts +1 -3
- package/lib/common/features/featureGate.tsx +1 -19
- package/lib/common/utils.ts +2 -2
- package/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTab.tsx +16 -11
- package/lib/ocm/components/Routes.tsx +34 -0
- package/lib/ocm/components/clusterConfiguration/DiscoveryImageForm.tsx +5 -1
- package/lib/ocm/components/clusterConfiguration/HostInventory.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/OcmBaseDomainField.tsx +0 -2
- package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +6 -10
- package/lib/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.tsx +2 -3
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsArray.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx +6 -19
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +8 -6
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/operators/CnvHostRequirements.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx +129 -42
- package/lib/ocm/components/clusterConfiguration/platformIntegration/PlatformIntegrationNote.tsx +10 -8
- package/lib/ocm/components/clusterConfiguration/platformIntegration/constants.tsx +7 -3
- package/lib/ocm/components/clusterConfiguration/review/ReviewStep.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpForm.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpHostsArray.tsx +3 -3
- package/lib/ocm/components/clusterConfiguration/staticIp/components/YamlView/MacIpMapping.tsx +1 -1
- package/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx +6 -4
- package/lib/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.tsx +3 -3
- package/lib/ocm/components/clusterDetail/CancelInstallationModal.tsx +1 -1
- package/lib/ocm/components/clusterDetail/ClusterDetail.tsx +1 -1
- package/lib/ocm/components/clusterDetail/ResetClusterModal.tsx +1 -1
- package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +12 -7
- package/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +5 -3
- package/lib/ocm/components/clusterWizard/CustomManifestStep.tsx +1 -1
- package/lib/ocm/components/clusterWizard/HostDiscovery.tsx +2 -2
- package/lib/ocm/components/clusterWizard/Operators.tsx +1 -1
- package/lib/ocm/components/clusterWizard/OperatorsStep.tsx +6 -19
- package/lib/ocm/components/clusterWizard/StaticIp.tsx +1 -1
- package/lib/ocm/components/clusters/AssistedInstallerHeader.tsx +25 -0
- package/lib/ocm/components/clusters/ClusterPage.tsx +4 -28
- package/lib/ocm/components/clusters/Clusters.tsx +9 -11
- package/lib/ocm/components/clusters/ClustersListToolbar.tsx +5 -5
- package/lib/ocm/components/clusters/ClustersTable.tsx +4 -1
- package/lib/ocm/components/clusters/NewClusterPage.tsx +3 -6
- package/lib/ocm/components/clusters/clusterPolling.ts +7 -7
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +21 -7
- package/lib/ocm/components/hosts/HostsDiscoveryTable.tsx +1 -1
- package/lib/ocm/components/hosts/use-hosts-table.tsx +5 -2
- package/lib/ocm/components/hosts/utils.ts +1 -1
- package/lib/ocm/components/index.ts +1 -1
- package/lib/ocm/components/ui/OcmFormFields.tsx +1 -1
- package/lib/ocm/hooks/index.ts +0 -1
- package/lib/ocm/hooks/useSetClusterPermissions.ts +1 -1
- package/lib/ocm/index.ts +0 -1
- package/lib/ocm/store/hooks.ts +6 -2
- package/lib/ocm/store/index.ts +5 -23
- package/lib/ocm/{selectors/clusters.tsx → store/slices/clusters/selectors.tsx} +10 -12
- package/lib/ocm/{reducers/clusters/clustersSlice.ts → store/slices/clusters/slice.ts} +6 -5
- package/lib/ocm/{selectors/currentCluster.ts → store/slices/current-cluster/selectors.ts} +7 -7
- package/lib/ocm/{reducers/clusters/currentClusterSlice.ts → store/slices/current-cluster/slice.ts} +10 -8
- package/lib/ocm/store/slices/feature-flags/selectors.ts +13 -0
- package/lib/ocm/store/slices/feature-flags/slice.ts +15 -0
- package/lib/ocm/store/slices/{infraEnvs → infra-envs}/selectors.ts +3 -3
- package/lib/ocm/store/slices/{infraEnvs → infra-envs}/thunks.ts +3 -3
- package/lib/ocm/store/store-day1.ts +23 -0
- package/lib/ocm/store/store-day2.ts +19 -0
- package/package.json +3 -4
- package/build/@types/ocm/components/Router.d.ts +0 -9
- package/build/@types/ocm/components/Router.d.ts.map +0 -1
- package/build/@types/ocm/hooks/useClusterSupportedPlatforms.d.ts +0 -11
- package/build/@types/ocm/hooks/useClusterSupportedPlatforms.d.ts.map +0 -1
- package/build/@types/ocm/hooks/useOracleDropdownItemState.d.ts +0 -10
- package/build/@types/ocm/hooks/useOracleDropdownItemState.d.ts.map +0 -1
- package/build/@types/ocm/reducers/clusters/clustersSlice.d.ts.map +0 -1
- package/build/@types/ocm/reducers/clusters/currentClusterSlice.d.ts.map +0 -1
- package/build/@types/ocm/reducers/clusters/index.d.ts +0 -3
- package/build/@types/ocm/reducers/clusters/index.d.ts.map +0 -1
- package/build/@types/ocm/selectors/clusters.d.ts.map +0 -1
- package/build/@types/ocm/selectors/currentCluster.d.ts +0 -14
- package/build/@types/ocm/selectors/currentCluster.d.ts.map +0 -1
- package/build/@types/ocm/selectors/index.d.ts +0 -3
- package/build/@types/ocm/selectors/index.d.ts.map +0 -1
- package/build/@types/ocm/store/slices/infraEnvs/selectors.d.ts.map +0 -1
- package/build/@types/ocm/store/slices/infraEnvs/slice.d.ts.map +0 -1
- package/build/@types/ocm/store/slices/infraEnvs/thunks.d.ts.map +0 -1
- package/build/cjs/ocm/components/Router.js +0 -25
- package/build/cjs/ocm/components/Router.js.map +0 -1
- package/build/cjs/ocm/hooks/useClusterSupportedPlatforms.js +0 -53
- package/build/cjs/ocm/hooks/useClusterSupportedPlatforms.js.map +0 -1
- package/build/cjs/ocm/hooks/useOracleDropdownItemState.js +0 -30
- package/build/cjs/ocm/hooks/useOracleDropdownItemState.js.map +0 -1
- package/build/cjs/ocm/reducers/clusters/clustersSlice.js.map +0 -1
- package/build/cjs/ocm/reducers/clusters/currentClusterSlice.js.map +0 -1
- package/build/cjs/ocm/reducers/clusters/index.js +0 -6
- package/build/cjs/ocm/reducers/clusters/index.js.map +0 -1
- package/build/cjs/ocm/selectors/clusters.js.map +0 -1
- package/build/cjs/ocm/selectors/currentCluster.js.map +0 -1
- package/build/cjs/ocm/selectors/index.js +0 -6
- package/build/cjs/ocm/selectors/index.js.map +0 -1
- package/build/cjs/ocm/store/slices/infraEnvs/selectors.js.map +0 -1
- package/build/cjs/ocm/store/slices/infraEnvs/slice.js.map +0 -1
- package/build/cjs/ocm/store/slices/infraEnvs/thunks.js.map +0 -1
- package/lib/ocm/components/Router.tsx +0 -29
- package/lib/ocm/hooks/useClusterSupportedPlatforms.ts +0 -70
- package/lib/ocm/hooks/useOracleDropdownItemState.ts +0 -45
- package/lib/ocm/reducers/clusters/index.ts +0 -2
- package/lib/ocm/selectors/index.ts +0 -2
- /package/build/@types/ocm/store/slices/{infraEnvs → infra-envs}/slice.d.ts +0 -0
- /package/build/@types/ocm/store/slices/{infraEnvs → infra-envs}/thunks.d.ts +0 -0
- /package/build/cjs/ocm/store/slices/{infraEnvs → infra-envs}/selectors.js +0 -0
- /package/build/cjs/ocm/store/slices/{infraEnvs → infra-envs}/slice.js +0 -0
- /package/build/cjs/ocm/store/slices/{infraEnvs → infra-envs}/thunks.js +0 -0
- /package/lib/ocm/store/slices/{infraEnvs → infra-envs}/slice.ts +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextContent, Text, Split, SplitItem } from '@patternfly/react-core';
|
|
3
|
+
import { ASSISTED_INSTALLER_DOCUMENTATION_LINK, ExternalLink } from '../../../common';
|
|
4
|
+
|
|
5
|
+
export const AssistedInstallerHeader = () => {
|
|
6
|
+
return (
|
|
7
|
+
<TextContent>
|
|
8
|
+
<Text component="h1" className="pf-u-display-inline">
|
|
9
|
+
Install OpenShift with the Assisted Installer
|
|
10
|
+
</Text>
|
|
11
|
+
<Split hasGutter>
|
|
12
|
+
<SplitItem>
|
|
13
|
+
<ExternalLink href={ASSISTED_INSTALLER_DOCUMENTATION_LINK}>
|
|
14
|
+
Assisted Installer documentation
|
|
15
|
+
</ExternalLink>
|
|
16
|
+
</SplitItem>
|
|
17
|
+
<SplitItem>
|
|
18
|
+
<Text component="a" data-testid="whats-new-link">
|
|
19
|
+
What's new in Assisted Installer?
|
|
20
|
+
</Text>
|
|
21
|
+
</SplitItem>
|
|
22
|
+
</Split>
|
|
23
|
+
</TextContent>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Redirect, RouteComponentProps } from 'react-router-dom';
|
|
3
3
|
import { useDispatch } from 'react-redux';
|
|
4
|
+
import { PageSection, PageSectionVariants, Text, TextContent } from '@patternfly/react-core';
|
|
4
5
|
import {
|
|
5
|
-
PageSection,
|
|
6
|
-
PageSectionVariants,
|
|
7
|
-
Split,
|
|
8
|
-
SplitItem,
|
|
9
|
-
Text,
|
|
10
|
-
TextContent,
|
|
11
|
-
} from '@patternfly/react-core';
|
|
12
|
-
import {
|
|
13
|
-
ASSISTED_INSTALLER_DOCUMENTATION_LINK,
|
|
14
6
|
AddHostsContextProvider,
|
|
15
7
|
AlertsContextProvider,
|
|
16
8
|
CpuArchitecture,
|
|
17
9
|
ErrorState,
|
|
18
|
-
ExternalLink,
|
|
19
10
|
ResourceUIState,
|
|
20
11
|
} from '../../../common';
|
|
21
12
|
import ClusterDetail from '../clusterDetail/ClusterDetail';
|
|
@@ -32,7 +23,7 @@ import { routeBasePath } from '../../config';
|
|
|
32
23
|
import ClusterWizardContextProvider from '../clusterWizard/ClusterWizardContextProvider';
|
|
33
24
|
import useInfraEnv from '../../hooks/useInfraEnv';
|
|
34
25
|
import { SentryErrorMonitorContextProvider } from '../SentryErrorMonitorContextProvider';
|
|
35
|
-
import { forceReload } from '../../
|
|
26
|
+
import { forceReload } from '../../store/slices/current-cluster/slice';
|
|
36
27
|
import { ClusterUiError } from './ClusterPageErrors';
|
|
37
28
|
import ClusterLoading from './ClusterLoading';
|
|
38
29
|
import ClusterPollingErrorModal from '../clusterDetail/ClusterPollingErrorModal';
|
|
@@ -41,6 +32,7 @@ import { BackButton } from '../ui/Buttons/BackButton';
|
|
|
41
32
|
import { NewFeatureSupportLevelProvider } from '../featureSupportLevels';
|
|
42
33
|
import { usePullSecret } from '../../hooks';
|
|
43
34
|
import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service';
|
|
35
|
+
import { AssistedInstallerHeader } from './AssistedInstallerHeader';
|
|
44
36
|
|
|
45
37
|
type MatchParams = {
|
|
46
38
|
clusterId: string;
|
|
@@ -113,23 +105,7 @@ const ClusterPageGeneric: React.FC<{ clusterId: string; showBreadcrumbs?: boolea
|
|
|
113
105
|
{showBreadcrumbs && <ClusterBreadcrumbs clusterName={cluster.name} />}
|
|
114
106
|
{showBreadcrumbs && (
|
|
115
107
|
<PageSection variant={PageSectionVariants.light}>
|
|
116
|
-
<
|
|
117
|
-
<Text component="h1" className="pf-u-display-inline">
|
|
118
|
-
Install OpenShift with the Assisted Installer
|
|
119
|
-
</Text>
|
|
120
|
-
<Split hasGutter>
|
|
121
|
-
<SplitItem>
|
|
122
|
-
<ExternalLink href={ASSISTED_INSTALLER_DOCUMENTATION_LINK}>
|
|
123
|
-
Assisted Installer documentation
|
|
124
|
-
</ExternalLink>
|
|
125
|
-
</SplitItem>
|
|
126
|
-
<SplitItem>
|
|
127
|
-
<Text component="a" data-testid="whats-new-link">
|
|
128
|
-
What's new in Assisted Installer?
|
|
129
|
-
</Text>
|
|
130
|
-
</SplitItem>
|
|
131
|
-
</Split>
|
|
132
|
-
</TextContent>
|
|
108
|
+
<AssistedInstallerHeader />
|
|
133
109
|
</PageSection>
|
|
134
110
|
)}
|
|
135
111
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
3
2
|
import { RouteComponentProps } from 'react-router-dom';
|
|
4
3
|
import {
|
|
5
4
|
Button,
|
|
@@ -10,8 +9,6 @@ import {
|
|
|
10
9
|
PageSection,
|
|
11
10
|
} from '@patternfly/react-core';
|
|
12
11
|
import { AddCircleOIcon } from '@patternfly/react-icons';
|
|
13
|
-
|
|
14
|
-
import { selectClusterTableRows, selectClustersUIState } from '../../selectors/clusters';
|
|
15
12
|
import {
|
|
16
13
|
ResourceUIState,
|
|
17
14
|
Alerts,
|
|
@@ -22,11 +19,7 @@ import {
|
|
|
22
19
|
AlertsContextProvider,
|
|
23
20
|
} from '../../../common';
|
|
24
21
|
import ClustersTable from './ClustersTable';
|
|
25
|
-
import {
|
|
26
|
-
fetchClustersAsync,
|
|
27
|
-
deleteCluster,
|
|
28
|
-
ClustersDispatch,
|
|
29
|
-
} from '../../reducers/clusters/clustersSlice';
|
|
22
|
+
import { fetchClustersAsync, deleteCluster } from '../../store/slices/clusters/slice';
|
|
30
23
|
import { handleApiError, getApiErrorMessage } from '../../api';
|
|
31
24
|
import ClusterBreadcrumbs from './ClusterBreadcrumbs';
|
|
32
25
|
import { routeBasePath } from '../../config';
|
|
@@ -34,6 +27,11 @@ import { ClustersService } from '../../services';
|
|
|
34
27
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
35
28
|
import ClusterPollingErrorModal from '../clusterDetail/ClusterPollingErrorModal';
|
|
36
29
|
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
30
|
+
import { useSelectorDay1, useDispatchDay1 } from '../../store';
|
|
31
|
+
import {
|
|
32
|
+
selectClustersUIState,
|
|
33
|
+
selectClusterTableRows,
|
|
34
|
+
} from '../../store/slices/clusters/selectors';
|
|
37
35
|
|
|
38
36
|
type ClustersProps = RouteComponentProps;
|
|
39
37
|
|
|
@@ -41,13 +39,13 @@ const Clusters: React.FC<ClustersProps> = ({ history }) => {
|
|
|
41
39
|
const { LOADING, EMPTY, POLLING_ERROR, RELOADING } = ResourceUIState;
|
|
42
40
|
const { addAlert } = useAlerts();
|
|
43
41
|
const { t } = useTranslation();
|
|
44
|
-
const clusterRows =
|
|
45
|
-
const clustersUIState =
|
|
42
|
+
const clusterRows = useSelectorDay1(selectClusterTableRows(t));
|
|
43
|
+
const clustersUIState = useSelectorDay1(selectClustersUIState);
|
|
46
44
|
const uiState = React.useRef(clustersUIState);
|
|
47
45
|
if (clustersUIState !== RELOADING) {
|
|
48
46
|
uiState.current = clustersUIState;
|
|
49
47
|
}
|
|
50
|
-
const dispatch =
|
|
48
|
+
const dispatch = useDispatchDay1();
|
|
51
49
|
const deleteClusterAsync = React.useCallback(
|
|
52
50
|
async (clusterId: Cluster['id']) => {
|
|
53
51
|
try {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
3
2
|
import { useHistory } from 'react-router-dom';
|
|
4
3
|
import {
|
|
5
4
|
Toolbar,
|
|
@@ -22,13 +21,14 @@ import {
|
|
|
22
21
|
import { FilterIcon, SyncIcon } from '@patternfly/react-icons';
|
|
23
22
|
import { clusterStatusLabels, isSelectEventChecked, ToolbarButton } from '../../../common';
|
|
24
23
|
import { ResourceUIState } from '../../../common';
|
|
25
|
-
import {
|
|
26
|
-
import { ClustersDispatch, fetchClustersAsync } from '../../reducers/clusters';
|
|
24
|
+
import { fetchClustersAsync } from '../../store/slices/clusters/slice';
|
|
27
25
|
import { routeBasePath } from '../../config';
|
|
28
26
|
import omit from 'lodash-es/omit.js';
|
|
29
27
|
import { TFunction } from 'i18next';
|
|
30
28
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
31
29
|
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
30
|
+
import { useDispatchDay1, useSelectorDay1 } from '../../store';
|
|
31
|
+
import { selectClustersUIState } from '../../store/slices/clusters/selectors';
|
|
32
32
|
|
|
33
33
|
export type ClusterFiltersType = {
|
|
34
34
|
[key: string]: string[]; // value from clusterStatusLabels
|
|
@@ -52,8 +52,8 @@ const ClustersListToolbar: React.FC<ClustersListToolbarProps> = ({
|
|
|
52
52
|
}) => {
|
|
53
53
|
const [isStatusExpanded, setStatusExpanded] = React.useState(false);
|
|
54
54
|
const history = useHistory();
|
|
55
|
-
const clustersUIState =
|
|
56
|
-
const dispatch =
|
|
55
|
+
const clustersUIState = useSelectorDay1(selectClustersUIState);
|
|
56
|
+
const dispatch = useDispatchDay1();
|
|
57
57
|
const fetchClusters = React.useCallback(() => void dispatch(fetchClustersAsync()), [dispatch]);
|
|
58
58
|
|
|
59
59
|
const onClearAllFilters: ToolbarProps['clearAllFilters'] = () => {
|
|
@@ -17,10 +17,13 @@ import {
|
|
|
17
17
|
} from '@patternfly/react-table';
|
|
18
18
|
import { ClusterTableRows } from '../../../common/types/clusters';
|
|
19
19
|
import DeleteClusterModal from './DeleteClusterModal';
|
|
20
|
-
import { ClusterRowDataProps, getClusterTableStatusCell } from '../../selectors/clusters';
|
|
21
20
|
import { clusterStatusLabels, rowSorter, HumanizedSortable } from '../../../common';
|
|
22
21
|
import ClustersListToolbar, { ClusterFiltersType } from './ClustersListToolbar';
|
|
23
22
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
23
|
+
import {
|
|
24
|
+
ClusterRowDataProps,
|
|
25
|
+
getClusterTableStatusCell,
|
|
26
|
+
} from '../../store/slices/clusters/selectors';
|
|
24
27
|
|
|
25
28
|
type DeleteClusterID = Pick<ClusterRowDataProps, 'id' | 'name'>;
|
|
26
29
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { PageSectionVariants,
|
|
2
|
+
import { PageSectionVariants, PageSection } from '@patternfly/react-core';
|
|
3
3
|
import { AlertsContextProvider } from '../../../common';
|
|
4
4
|
import ClusterBreadcrumbs from './ClusterBreadcrumbs';
|
|
5
5
|
import { ClusterDefaultConfigurationProvider } from '../clusterConfiguration/ClusterDefaultConfigurationContext';
|
|
@@ -9,6 +9,7 @@ import { SentryErrorMonitorContextProvider } from '../SentryErrorMonitorContextP
|
|
|
9
9
|
import ClusterLoading from './ClusterLoading';
|
|
10
10
|
import { ClusterUiError } from './ClusterPageErrors';
|
|
11
11
|
import { NewFeatureSupportLevelProvider } from '../featureSupportLevels';
|
|
12
|
+
import { AssistedInstallerHeader } from './AssistedInstallerHeader';
|
|
12
13
|
|
|
13
14
|
const NewClusterPageGeneric: React.FC<{ pageTitleSection?: ReactNode }> = ({
|
|
14
15
|
pageTitleSection,
|
|
@@ -38,11 +39,7 @@ const NewClusterTitleSection: React.FC = () => (
|
|
|
38
39
|
<>
|
|
39
40
|
<ClusterBreadcrumbs clusterName="New cluster" />
|
|
40
41
|
<PageSection variant={PageSectionVariants.light}>
|
|
41
|
-
<
|
|
42
|
-
<Text component="h1" className="pf-u-display-inline">
|
|
43
|
-
Install OpenShift with the Assisted Installer
|
|
44
|
-
</Text>
|
|
45
|
-
</TextContent>
|
|
42
|
+
<AssistedInstallerHeader />
|
|
46
43
|
</PageSection>
|
|
47
44
|
</>
|
|
48
45
|
);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSelector, useDispatch } from 'react-redux';
|
|
3
2
|
import { ResourceUIState, POLLING_INTERVAL } from '../../../common';
|
|
4
3
|
import {
|
|
5
4
|
fetchClusterAsync,
|
|
@@ -7,10 +6,10 @@ import {
|
|
|
7
6
|
forceReload,
|
|
8
7
|
cancelForceReload,
|
|
9
8
|
FetchErrorType,
|
|
10
|
-
|
|
11
|
-
} from '../../
|
|
12
|
-
import { selectCurrentClusterState } from '../../selectors';
|
|
9
|
+
} from '../../store/slices/current-cluster/slice';
|
|
10
|
+
import { selectCurrentClusterState } from '../../store/slices/current-cluster/selectors';
|
|
13
11
|
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
12
|
+
import { useDispatchDay1, useSelectorDay1 } from '../../store';
|
|
14
13
|
|
|
15
14
|
const shouldRefetch = (uiState: ResourceUIState, hasClusterData: boolean) => {
|
|
16
15
|
if (uiState === ResourceUIState.POLLING_ERROR) {
|
|
@@ -24,7 +23,7 @@ const shouldRefetch = (uiState: ResourceUIState, hasClusterData: boolean) => {
|
|
|
24
23
|
};
|
|
25
24
|
|
|
26
25
|
export const useFetchCluster = (clusterId: string) => {
|
|
27
|
-
const dispatch =
|
|
26
|
+
const dispatch = useDispatchDay1();
|
|
28
27
|
return React.useCallback(() => {
|
|
29
28
|
if (clusterId) {
|
|
30
29
|
void dispatch(fetchClusterAsync(clusterId));
|
|
@@ -39,8 +38,9 @@ export const useClusterPolling = (
|
|
|
39
38
|
uiState: ResourceUIState;
|
|
40
39
|
errorDetail: FetchErrorType | undefined;
|
|
41
40
|
} => {
|
|
42
|
-
const { isReloadScheduled, uiState, data, errorDetail } =
|
|
43
|
-
|
|
41
|
+
const { isReloadScheduled, uiState, data, errorDetail } =
|
|
42
|
+
useSelectorDay1(selectCurrentClusterState);
|
|
43
|
+
const dispatch = useDispatchDay1();
|
|
44
44
|
const fetchCluster = useFetchCluster(clusterId);
|
|
45
45
|
const hasClusterData = !!data;
|
|
46
46
|
|
|
@@ -134,6 +134,16 @@ const getNetworkTypeSelectionDisabledReason = (cluster: Cluster | undefined) =>
|
|
|
134
134
|
return undefined;
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
+
const getOciDisabledReason = (cpuArchitecture: string | undefined, isSupported: boolean) => {
|
|
138
|
+
if (!isSupported) {
|
|
139
|
+
if (cpuArchitecture === CpuArchitecture.s390x || cpuArchitecture === CpuArchitecture.ppc64le) {
|
|
140
|
+
return `Integration with Oracle is not available with the selected CPU architecture.`;
|
|
141
|
+
} else {
|
|
142
|
+
return 'Integration with Oracle is available for OpenShift 4.14 and later versions.';
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
137
147
|
export const getNewFeatureDisabledReason = (
|
|
138
148
|
featureId: FeatureId,
|
|
139
149
|
cluster: Cluster | undefined,
|
|
@@ -164,17 +174,21 @@ export const getNewFeatureDisabledReason = (
|
|
|
164
174
|
return 'Cluster-managed networking is not supported for ARM architecture with this version of OpenShift.';
|
|
165
175
|
}
|
|
166
176
|
case 'EXTERNAL_PLATFORM_OCI': {
|
|
167
|
-
|
|
168
|
-
return "Can't set Oracle platform on s390x architecture";
|
|
169
|
-
} else {
|
|
170
|
-
return 'Integration with Oracle is available for OpenShift 4.14 and later versions.';
|
|
171
|
-
}
|
|
177
|
+
return getOciDisabledReason(cpuArchitecture, isSupported);
|
|
172
178
|
}
|
|
173
179
|
case 'MCE': {
|
|
174
180
|
if (!isSupported) {
|
|
175
181
|
return 'Multicluster engine is not supported in this OpenShift version.';
|
|
176
|
-
}
|
|
177
|
-
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
case 'NUTANIX_INTEGRATION': {
|
|
185
|
+
if (!isSupported) {
|
|
186
|
+
return `Integration with Nutanix is not available with the selected CPU architecture.`;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
case 'VSPHERE_INTEGRATION': {
|
|
190
|
+
if (!isSupported) {
|
|
191
|
+
return `Integration with vSphere is not available with the selected CPU architecture.`;
|
|
178
192
|
}
|
|
179
193
|
}
|
|
180
194
|
default: {
|
|
@@ -26,7 +26,7 @@ import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
|
26
26
|
import { hardwareStatusColumn } from './HardwareStatus';
|
|
27
27
|
import HostsTableEmptyState from '../hosts/HostsTableEmptyState';
|
|
28
28
|
import { useSelector } from 'react-redux';
|
|
29
|
-
import { selectCurrentClusterPermissionsState } from '../../selectors';
|
|
29
|
+
import { selectCurrentClusterPermissionsState } from '../../store/slices/current-cluster/selectors';
|
|
30
30
|
import { useClusterWizardContext } from '../clusterWizard/ClusterWizardContext';
|
|
31
31
|
import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
32
32
|
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
setServerUpdateError,
|
|
21
21
|
updateCluster,
|
|
22
22
|
updateHost,
|
|
23
|
-
} from '../../
|
|
23
|
+
} from '../../store/slices/current-cluster/slice';
|
|
24
24
|
import { useModalDialogsContext } from './ModalDialogsContext';
|
|
25
25
|
import { downloadHostInstallationLogs, onAdditionalNtpSourceAction } from './utils';
|
|
26
26
|
import {
|
|
@@ -47,7 +47,6 @@ import UpdateDay2ApiVipModal from './UpdateDay2ApiVipModal';
|
|
|
47
47
|
import { UpdateDay2ApiVipFormProps } from './UpdateDay2ApiVipForm';
|
|
48
48
|
import { usePagination } from '../../../common/components/hosts/usePagination';
|
|
49
49
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
50
|
-
import { selectCurrentClusterPermissionsState, selectCurrentClusterState } from '../../selectors';
|
|
51
50
|
import { hardwareStatusColumn } from './HardwareStatus';
|
|
52
51
|
import { ClusterWizardContext } from '../clusterWizard/ClusterWizardContext';
|
|
53
52
|
import {
|
|
@@ -57,6 +56,10 @@ import {
|
|
|
57
56
|
Host,
|
|
58
57
|
HostUpdateParams,
|
|
59
58
|
} from '@openshift-assisted/types/assisted-installer-service';
|
|
59
|
+
import {
|
|
60
|
+
selectCurrentClusterPermissionsState,
|
|
61
|
+
selectCurrentClusterState,
|
|
62
|
+
} from '../../store/slices/current-cluster/selectors';
|
|
60
63
|
|
|
61
64
|
export const useHostsTable = (cluster: Cluster) => {
|
|
62
65
|
const { addAlert } = useAlerts();
|
|
@@ -2,7 +2,7 @@ import { saveAs } from 'file-saver';
|
|
|
2
2
|
import type { AlertsContextType } from '../../../common';
|
|
3
3
|
|
|
4
4
|
import { isInOcm, handleApiError, getApiErrorMessage } from '../../api';
|
|
5
|
-
import { updateCluster } from '../../
|
|
5
|
+
import { updateCluster } from '../../store/slices/current-cluster/slice';
|
|
6
6
|
import { ClustersService } from '../../services';
|
|
7
7
|
import ClustersAPI from '../../../common/api/assisted-service/ClustersAPI';
|
|
8
8
|
import { stringToJSON } from '../../../common/utils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import { Checkbox, CheckboxProps, Radio, RadioProps } from '@patternfly/react-core';
|
|
4
|
-
import { selectCurrentClusterPermissionsState } from '../../selectors';
|
|
4
|
+
import { selectCurrentClusterPermissionsState } from '../../store/slices/current-cluster/selectors';
|
|
5
5
|
import {
|
|
6
6
|
CheckboxField,
|
|
7
7
|
CodeField,
|
package/lib/ocm/hooks/index.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { default as useOpenshiftVersions } from './useOpenshiftVersions';
|
|
2
|
-
export { default as useClusterSupportedPlatforms } from './useClusterSupportedPlatforms';
|
|
3
2
|
export { default as useManagedDomains } from './useManagedDomains';
|
|
4
3
|
export { default as useUsedClusterNames } from './useUsedClusterNames';
|
|
5
4
|
export { default as useInfraEnvId } from './useInfraEnvId';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useDispatch } from 'react-redux';
|
|
2
2
|
import { AssistedInstallerOCMPermissionTypesListType } from '../../common';
|
|
3
3
|
import { ExtendedCluster, getBasePermissions, ocmPermissionsToAIPermissions } from '../config';
|
|
4
|
-
import { updateClusterPermissions } from '../
|
|
4
|
+
import { updateClusterPermissions } from '../store/slices/current-cluster/slice';
|
|
5
5
|
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
6
6
|
|
|
7
7
|
export default function useSetClusterPermissions() {
|
package/lib/ocm/index.ts
CHANGED
package/lib/ocm/store/hooks.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
2
|
+
import type { TypedUseSelectorHook } from 'react-redux';
|
|
3
|
+
import type { DispatchDay1, RootStateDay1 } from './store-day1';
|
|
4
|
+
import type { DispatchDay2, RootStateDay2 } from './store-day2';
|
|
3
5
|
|
|
4
6
|
export const useDispatchDay1: () => DispatchDay1 = useDispatch;
|
|
7
|
+
export const useSelectorDay1: TypedUseSelectorHook<RootStateDay1> = useSelector;
|
|
5
8
|
export const useDispatchDay2: () => DispatchDay2 = useDispatch;
|
|
9
|
+
export const useSelectorDay2: TypedUseSelectorHook<RootStateDay2> = useSelector;
|
package/lib/ocm/store/index.ts
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const store = configureStore({
|
|
7
|
-
reducer: {
|
|
8
|
-
clusters: clustersReducer,
|
|
9
|
-
currentCluster: currentClusterReducer,
|
|
10
|
-
infraEnvs: infraEnvsReducer,
|
|
11
|
-
},
|
|
12
|
-
preloadedState: {},
|
|
13
|
-
});
|
|
14
|
-
export type RootState = ReturnType<typeof store.getState>;
|
|
15
|
-
export type DispatchDay1 = (typeof store)['dispatch'];
|
|
16
|
-
|
|
17
|
-
export const storeDay2 = configureStore({
|
|
18
|
-
reducer: {
|
|
19
|
-
infraEnvs: infraEnvsReducer,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
export type RootStateDay2 = ReturnType<typeof storeDay2.getState>;
|
|
23
|
-
export type DispatchDay2 = (typeof storeDay2)['dispatch'];
|
|
1
|
+
export { storeDay1 } from './store-day1';
|
|
2
|
+
export { storeDay2 } from './store-day2';
|
|
3
|
+
export type { RootStateDay1, DispatchDay1 } from './store-day1';
|
|
4
|
+
export type { RootStateDay2, DispatchDay2 } from './store-day2';
|
|
5
|
+
export { useSelectorDay1, useSelectorDay2, useDispatchDay1, useDispatchDay2 } from './hooks';
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createSelector } from '@reduxjs/toolkit';
|
|
3
|
-
import { IRow, IRowData } from '@patternfly/react-table';
|
|
3
|
+
import type { IRow, IRowData } from '@patternfly/react-table';
|
|
4
4
|
import { Link } from 'react-router-dom';
|
|
5
|
-
import { TFunction } from 'i18next';
|
|
6
|
-
|
|
5
|
+
import type { TFunction } from 'i18next';
|
|
7
6
|
import {
|
|
8
7
|
DASH,
|
|
9
8
|
getDateTimeCell,
|
|
10
9
|
getEnabledHostCount,
|
|
11
10
|
getOpenshiftVersionText,
|
|
12
11
|
getTotalHostCount,
|
|
13
|
-
ClusterTableRows,
|
|
14
12
|
HostsCount,
|
|
15
|
-
HumanizedSortable,
|
|
16
13
|
ResourceUIState,
|
|
17
|
-
} from '
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
14
|
+
} from '../../../../common';
|
|
15
|
+
import type { ClusterTableRows, HumanizedSortable } from '../../../../common';
|
|
16
|
+
import ClusterStatus, { getClusterStatusText } from '../../../components/clusters/ClusterStatus';
|
|
17
|
+
import { routeBasePath } from '../../../config';
|
|
18
|
+
import { RootStateDay1 } from '../../store-day1';
|
|
19
|
+
import type { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
22
20
|
|
|
23
|
-
const selectClusters = (state:
|
|
24
|
-
const clustersUIState = (state:
|
|
21
|
+
const selectClusters = (state: RootStateDay1) => state.clusters.data;
|
|
22
|
+
const clustersUIState = (state: RootStateDay1) => state.clusters.uiState;
|
|
25
23
|
|
|
26
24
|
export const selectClustersUIState = createSelector(
|
|
27
25
|
[selectClusters, clustersUIState],
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
AnyAction,
|
|
7
7
|
Dispatch,
|
|
8
8
|
} from '@reduxjs/toolkit';
|
|
9
|
-
import { ResourceUIState } from '
|
|
10
|
-
import { ClustersAPI } from '
|
|
11
|
-
import { handleApiError, isInOcm } from '
|
|
9
|
+
import { ResourceUIState } from '../../../../common';
|
|
10
|
+
import { ClustersAPI } from '../../../services/apis';
|
|
11
|
+
import { handleApiError, isInOcm } from '../../../api';
|
|
12
12
|
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
13
13
|
|
|
14
14
|
export const fetchClustersAsync = createAsyncThunk<Cluster[] | void>(
|
|
@@ -60,5 +60,6 @@ export const clustersSlice = createSlice({
|
|
|
60
60
|
},
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
export
|
|
63
|
+
const { actions, reducer } = clustersSlice;
|
|
64
|
+
export const { deleteCluster } = actions;
|
|
65
|
+
export const clustersReducer = reducer;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AssistedInstallerPermissionTypesListType } from '
|
|
2
|
-
import {
|
|
1
|
+
import { AssistedInstallerPermissionTypesListType } from '../../../../common';
|
|
2
|
+
import { RootStateDay1 } from '../../store-day1';
|
|
3
3
|
|
|
4
|
-
export const selectCurrentClusterState = (state:
|
|
5
|
-
export const selectCurrentCluster = (state:
|
|
6
|
-
export const selectCurrentClusterUIState = (state:
|
|
7
|
-
export const selectIsCurrentClusterSNO = (state:
|
|
4
|
+
export const selectCurrentClusterState = (state: RootStateDay1) => state.currentCluster;
|
|
5
|
+
export const selectCurrentCluster = (state: RootStateDay1) => state.currentCluster.data;
|
|
6
|
+
export const selectCurrentClusterUIState = (state: RootStateDay1) => state.currentCluster.uiState;
|
|
7
|
+
export const selectIsCurrentClusterSNO = (state: RootStateDay1) =>
|
|
8
8
|
state.currentCluster.data?.highAvailabilityMode === 'None';
|
|
9
9
|
export const selectCurrentClusterPermissionsState = (
|
|
10
|
-
state:
|
|
10
|
+
state: RootStateDay1,
|
|
11
11
|
): AssistedInstallerPermissionTypesListType => {
|
|
12
12
|
if (state.currentCluster) {
|
|
13
13
|
return state.currentCluster.permissions;
|
package/lib/ocm/{reducers/clusters/currentClusterSlice.ts → store/slices/current-cluster/slice.ts}
RENAMED
|
@@ -9,15 +9,16 @@ import {
|
|
|
9
9
|
PayloadAction,
|
|
10
10
|
ThunkDispatch,
|
|
11
11
|
} from '@reduxjs/toolkit';
|
|
12
|
-
import {
|
|
12
|
+
import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
13
13
|
import {
|
|
14
|
-
|
|
14
|
+
AssistedInstallerPermissionTypesListType,
|
|
15
|
+
FETCH_ABORTED_ERROR_CODE,
|
|
15
16
|
getApiErrorCode,
|
|
17
|
+
getApiErrorMessage,
|
|
16
18
|
handleApiError,
|
|
17
|
-
|
|
18
|
-
} from '
|
|
19
|
-
import
|
|
20
|
-
import { Cluster, Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
19
|
+
ResourceUIState,
|
|
20
|
+
} from '../../../../common';
|
|
21
|
+
import ClustersService from '../../../services/ClustersService';
|
|
21
22
|
|
|
22
23
|
export type FetchErrorType = {
|
|
23
24
|
code: string | number;
|
|
@@ -140,6 +141,7 @@ export const currentClusterSlice = createSlice({
|
|
|
140
141
|
},
|
|
141
142
|
});
|
|
142
143
|
|
|
144
|
+
const { actions, reducer } = currentClusterSlice;
|
|
143
145
|
export const {
|
|
144
146
|
updateCluster,
|
|
145
147
|
updateClusterBase,
|
|
@@ -149,5 +151,5 @@ export const {
|
|
|
149
151
|
forceReload,
|
|
150
152
|
cancelForceReload,
|
|
151
153
|
updateClusterPermissions,
|
|
152
|
-
} =
|
|
153
|
-
export
|
|
154
|
+
} = actions;
|
|
155
|
+
export const currentClusterReducer = reducer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createSelector } from '@reduxjs/toolkit';
|
|
2
|
+
import { AssistedInstallerFeatureType } from '../../../../common';
|
|
3
|
+
import { RootStateDay1 } from '../../store-day1';
|
|
4
|
+
|
|
5
|
+
export const selectFeatureFlagsSlice = (state: RootStateDay1) => state.featureFlags;
|
|
6
|
+
|
|
7
|
+
export const isFeatureEnabled = createSelector(
|
|
8
|
+
[selectFeatureFlagsSlice, (_, feature: AssistedInstallerFeatureType) => feature],
|
|
9
|
+
(featureFlags, feature) => {
|
|
10
|
+
// Configured via Unleash in the OCM
|
|
11
|
+
return !!featureFlags[feature];
|
|
12
|
+
},
|
|
13
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { FeatureListType } from '../../../../common';
|
|
3
|
+
|
|
4
|
+
const featureFlagsSlice = createSlice({
|
|
5
|
+
name: 'featureFlags',
|
|
6
|
+
initialState: {} as FeatureListType,
|
|
7
|
+
reducers: {
|
|
8
|
+
setFeatureFlags: (state, action: PayloadAction<FeatureListType>) => {
|
|
9
|
+
return Object.assign(state, action.payload);
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const featureFlagsActions = featureFlagsSlice.actions;
|
|
15
|
+
export const featureFlagsReducer = featureFlagsSlice.reducer;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createSelector } from '@reduxjs/toolkit';
|
|
2
|
-
import type {
|
|
2
|
+
import type { RootStateDay1 } from '../../store-day1';
|
|
3
3
|
import type { CpuArchitecture } from '../../../../common';
|
|
4
4
|
|
|
5
|
-
export const selectInfraEnvsSlice = (state:
|
|
5
|
+
export const selectInfraEnvsSlice = (state: RootStateDay1) => state.infraEnvs;
|
|
6
6
|
export const selectInfraEnvByCpuArchitecture = createSelector(
|
|
7
|
-
[selectInfraEnvsSlice, (_:
|
|
7
|
+
[selectInfraEnvsSlice, (_: RootStateDay1, cpuArchitecture: CpuArchitecture) => cpuArchitecture],
|
|
8
8
|
(infraEnvs, cpuArchitecture) =>
|
|
9
9
|
infraEnvs.find((infraEnv) => infraEnv.cpuArchitecture === cpuArchitecture),
|
|
10
10
|
);
|