@openshift-assisted/ui-lib 2.9.8-cim → 2.9.10-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/ClusterDeploymentDetailsStep.d.ts +6 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/utils.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts +1 -0
- package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts +1 -0
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/agent-cluster-install.d.ts +1 -1
- package/build/@types/cim/types/k8s/agent-cluster-install.d.ts.map +1 -1
- package/build/@types/common/api/accounts-management-service/current-account-api.d.ts +6 -0
- package/build/@types/common/api/accounts-management-service/current-account-api.d.ts.map +1 -0
- package/build/@types/common/api/accounts-management-service/organizations-api.d.ts +6 -0
- package/build/@types/common/api/accounts-management-service/organizations-api.d.ts.map +1 -0
- package/build/@types/common/api/assisted-service/UISettingsAPI.d.ts +8 -0
- package/build/@types/common/api/assisted-service/UISettingsAPI.d.ts.map +1 -0
- package/build/@types/common/api/assisted-service/index.d.ts +1 -0
- package/build/@types/common/api/assisted-service/index.d.ts.map +1 -1
- package/build/@types/common/api/authorization-service/all-apis.d.ts +7 -0
- package/build/@types/common/api/authorization-service/all-apis.d.ts.map +1 -0
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionMode.d.ts +3 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionMode.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/TangServers.d.ts +3 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/TangServers.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/OpenShiftVersionSelect.d.ts +2 -0
- package/build/@types/common/components/clusterConfiguration/OpenShiftVersionSelect.d.ts.map +1 -1
- package/build/@types/common/components/clusterDetail/PostInstallAlert.d.ts +6 -0
- package/build/@types/common/components/clusterDetail/PostInstallAlert.d.ts.map +1 -0
- package/build/@types/common/components/clusterDetail/index.d.ts +1 -0
- package/build/@types/common/components/clusterDetail/index.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/ReviewValidations.d.ts.map +1 -1
- package/build/@types/common/components/ui/NoPermissionsError.d.ts +3 -0
- package/build/@types/common/components/ui/NoPermissionsError.d.ts.map +1 -0
- package/build/@types/common/components/ui/formik/InputField.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/RichInputField.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/types.d.ts +2 -2
- package/build/@types/common/components/ui/formik/types.d.ts.map +1 -1
- package/build/@types/common/components/ui/index.d.ts +1 -0
- package/build/@types/common/components/ui/index.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 -1
- package/build/@types/common/features/featureGate.d.ts.map +1 -1
- package/build/@types/common/types/cpuArchitecture.d.ts +1 -1
- package/build/@types/common/types/cpuArchitecture.d.ts.map +1 -1
- package/build/@types/ocm/components/AddHosts/AddHosts.d.ts.map +1 -1
- package/build/@types/ocm/components/AddHosts/InventoryAddHost.d.ts +1 -2
- package/build/@types/ocm/components/AddHosts/InventoryAddHost.d.ts.map +1 -1
- package/build/@types/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.d.ts.map +1 -1
- package/build/@types/ocm/components/AddHosts/day2Wizard/Day2StaticIpHostConfigurations.d.ts +3 -1
- package/build/@types/ocm/components/AddHosts/day2Wizard/Day2StaticIpHostConfigurations.d.ts.map +1 -1
- package/build/@types/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.d.ts.map +1 -1
- package/build/@types/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContentErrors.d.ts +1 -4
- package/build/@types/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContentErrors.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts +3 -2
- package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/CustomManifestCheckbox.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmBaseDomainField.d.ts +2 -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/manifestsConfiguration/CustomManifestsPage.d.ts +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.d.ts +3 -4
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/data/dataTypes.d.ts +0 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/data/dataTypes.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.d.ts +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/ClusterDetailStatusMessages.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 +1 -2
- package/build/@types/ocm/components/clusterWizard/ClusterDetailsForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContext.d.ts +5 -3
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContext.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContextProvider.d.ts.map +1 -1
- package/build/@types/ocm/components/ui/OcmFormFields.d.ts +1 -1
- package/build/@types/ocm/hooks/index.d.ts +1 -0
- package/build/@types/ocm/hooks/index.d.ts.map +1 -1
- package/build/@types/ocm/hooks/useOpenshiftVersions.d.ts +1 -2
- package/build/@types/ocm/hooks/useOpenshiftVersions.d.ts.map +1 -1
- package/build/@types/ocm/hooks/useSupportLevelsAPI.d.ts +4 -4
- package/build/@types/ocm/hooks/useSupportLevelsAPI.d.ts.map +1 -1
- package/build/@types/ocm/hooks/useUISettings.d.ts +10 -0
- package/build/@types/ocm/hooks/useUISettings.d.ts.map +1 -0
- package/build/@types/ocm/services/ClusterDetailsService.d.ts +2 -1
- package/build/@types/ocm/services/ClusterDetailsService.d.ts.map +1 -1
- package/build/@types/ocm/services/ClustersService.d.ts +0 -1
- package/build/@types/ocm/services/ClustersService.d.ts.map +1 -1
- package/build/@types/ocm/services/Day2ClusterService.d.ts +3 -2
- package/build/@types/ocm/services/Day2ClusterService.d.ts.map +1 -1
- package/build/@types/ocm/services/UISettingsService.d.ts +8 -0
- package/build/@types/ocm/services/UISettingsService.d.ts.map +1 -0
- package/build/@types/ocm/services/index.d.ts +1 -0
- package/build/@types/ocm/services/index.d.ts.map +1 -1
- package/build/@types/ocm/services/types.d.ts +4 -0
- package/build/@types/ocm/services/types.d.ts.map +1 -1
- package/build/cjs/cim/components/Agent/BMCForm.js +3 -3
- package/build/cjs/cim/components/Agent/BMCForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +9 -5
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +6 -2
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js +7 -4
- package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/utils.js +6 -6
- package/build/cjs/cim/components/InfraEnv/utils.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +3 -1
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/cim/components/modals/ScaleUpModal.js +2 -2
- package/build/cjs/cim/components/modals/ScaleUpModal.js.map +1 -1
- package/build/cjs/common/api/accounts-management-service/access-token-api.js +1 -1
- package/build/cjs/common/api/accounts-management-service/current-account-api.js +17 -0
- package/build/cjs/common/api/accounts-management-service/current-account-api.js.map +1 -0
- package/build/cjs/common/api/accounts-management-service/organizations-api.js +19 -0
- package/build/cjs/common/api/accounts-management-service/organizations-api.js.map +1 -0
- package/build/cjs/common/api/assisted-service/UISettingsAPI.js +21 -0
- package/build/cjs/common/api/assisted-service/UISettingsAPI.js.map +1 -0
- package/build/cjs/common/api/assisted-service/index.js +3 -1
- package/build/cjs/common/api/assisted-service/index.js.map +1 -1
- package/build/cjs/common/api/authorization-service/all-apis.js +23 -0
- package/build/cjs/common/api/authorization-service/all-apis.js.map +1 -0
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js +1 -1
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionMode.js +6 -4
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionMode.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/TangServers.js +5 -3
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/TangServers.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/OpenShiftVersionSelect.js +2 -2
- package/build/cjs/common/components/clusterConfiguration/OpenShiftVersionSelect.js.map +1 -1
- package/build/cjs/common/components/clusterDetail/PostInstallAlert.js +16 -0
- package/build/cjs/common/components/clusterDetail/PostInstallAlert.js.map +1 -0
- package/build/cjs/common/components/clusterDetail/index.js +3 -1
- package/build/cjs/common/components/clusterDetail/index.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/ReviewValidations.js +3 -0
- package/build/cjs/common/components/clusterWizard/ReviewValidations.js.map +1 -1
- package/build/cjs/common/components/ui/NoPermissionsError.js +14 -0
- package/build/cjs/common/components/ui/NoPermissionsError.js.map +1 -0
- package/build/cjs/common/components/ui/formik/InputField.js +5 -5
- package/build/cjs/common/components/ui/formik/InputField.js.map +1 -1
- package/build/cjs/common/components/ui/formik/RichInputField.js +5 -2
- package/build/cjs/common/components/ui/formik/RichInputField.js.map +1 -1
- package/build/cjs/common/components/ui/formik/SelectField.js +1 -1
- package/build/cjs/common/components/ui/formik/SelectField.js.map +1 -1
- package/build/cjs/common/components/ui/index.js +3 -1
- package/build/cjs/common/components/ui/index.js.map +1 -1
- package/build/cjs/common/config/constants.js +1 -0
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/features/featureGate.js +1 -3
- package/build/cjs/common/features/featureGate.js.map +1 -1
- package/build/cjs/common/types/cpuArchitecture.js +5 -9
- package/build/cjs/common/types/cpuArchitecture.js.map +1 -1
- package/build/cjs/ocm/components/AddHosts/AddHosts.js +1 -2
- package/build/cjs/ocm/components/AddHosts/AddHosts.js.map +1 -1
- package/build/cjs/ocm/components/AddHosts/InventoryAddHost.js +2 -2
- package/build/cjs/ocm/components/AddHosts/InventoryAddHost.js.map +1 -1
- package/build/cjs/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.js +4 -4
- package/build/cjs/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.js.map +1 -1
- package/build/cjs/ocm/components/AddHosts/day2Wizard/Day2StaticIpHostConfigurations.js +7 -6
- package/build/cjs/ocm/components/AddHosts/day2Wizard/Day2StaticIpHostConfigurations.js.map +1 -1
- package/build/cjs/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.js +3 -20
- package/build/cjs/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.js.map +1 -1
- package/build/cjs/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContentErrors.js +1 -13
- package/build/cjs/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContentErrors.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js +24 -3
- package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/CustomManifestCheckbox.js +22 -32
- package/build/cjs/ocm/components/clusterConfiguration/CustomManifestCheckbox.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js +7 -5
- package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +3 -4
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js +6 -12
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.js +2 -2
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.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 +49 -123
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/ExpandedManifest.js +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/ExpandedManifest.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.js +14 -19
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +4 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js +5 -2
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailStatusMessages.js +2 -7
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailStatusMessages.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +5 -12
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js +18 -13
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContext.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js +45 -36
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js.map +1 -1
- package/build/cjs/ocm/hooks/index.js +3 -1
- package/build/cjs/ocm/hooks/index.js.map +1 -1
- package/build/cjs/ocm/hooks/useOpenshiftVersions.js +0 -5
- package/build/cjs/ocm/hooks/useOpenshiftVersions.js.map +1 -1
- package/build/cjs/ocm/hooks/useSupportLevelsAPI.js +34 -1
- package/build/cjs/ocm/hooks/useSupportLevelsAPI.js.map +1 -1
- package/build/cjs/ocm/hooks/useUISettings.js +62 -0
- package/build/cjs/ocm/hooks/useUISettings.js.map +1 -0
- package/build/cjs/ocm/services/ClusterDetailsService.js +2 -5
- package/build/cjs/ocm/services/ClusterDetailsService.js.map +1 -1
- package/build/cjs/ocm/services/ClustersService.js +0 -8
- package/build/cjs/ocm/services/ClustersService.js.map +1 -1
- package/build/cjs/ocm/services/Day2ClusterService.js +13 -4
- package/build/cjs/ocm/services/Day2ClusterService.js.map +1 -1
- package/build/cjs/ocm/services/UISettingsService.js +18 -0
- package/build/cjs/ocm/services/UISettingsService.js.map +1 -0
- package/build/cjs/ocm/services/index.js +3 -1
- package/build/cjs/ocm/services/index.js.map +1 -1
- package/lib/cim/components/Agent/BMCForm.tsx +3 -3
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +17 -5
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +9 -2
- package/lib/cim/components/ClusterDeployment/ScaleUpForm.tsx +11 -5
- package/lib/cim/components/InfraEnv/utils.ts +7 -6
- package/lib/cim/components/helpers/versions.ts +5 -0
- package/lib/cim/components/modals/ScaleUpModal.tsx +3 -0
- package/lib/cim/types/k8s/agent-cluster-install.ts +4 -7
- package/lib/common/api/accounts-management-service/access-token-api.ts +1 -1
- package/lib/common/api/accounts-management-service/current-account-api.ts +13 -0
- package/lib/common/api/accounts-management-service/organizations-api.ts +15 -0
- package/lib/common/api/assisted-service/UISettingsAPI.ts +24 -0
- package/lib/common/api/assisted-service/index.ts +1 -0
- package/lib/common/api/authorization-service/all-apis.ts +28 -0
- package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.tsx +5 -1
- package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionMode.tsx +27 -16
- package/lib/common/components/clusterConfiguration/DiskEncryptionFields/TangServers.tsx +27 -17
- package/lib/common/components/clusterConfiguration/OpenShiftVersionSelect.tsx +4 -1
- package/lib/common/components/clusterDetail/PostInstallAlert.tsx +29 -0
- package/lib/common/components/clusterDetail/index.ts +1 -0
- package/lib/common/components/clusterWizard/ReviewValidations.tsx +3 -0
- package/lib/common/components/ui/NoPermissionsError.tsx +19 -0
- package/lib/common/components/ui/formik/InputField.tsx +4 -5
- package/lib/common/components/ui/formik/RichInputField.tsx +6 -2
- package/lib/common/components/ui/formik/SelectField.tsx +1 -1
- package/lib/common/components/ui/formik/types.ts +2 -1
- package/lib/common/components/ui/index.ts +1 -0
- package/lib/common/config/constants.ts +1 -0
- package/lib/common/features/featureGate.tsx +0 -4
- package/lib/common/types/cpuArchitecture.ts +3 -8
- package/lib/ocm/components/AddHosts/AddHosts.tsx +1 -3
- package/lib/ocm/components/AddHosts/InventoryAddHost.tsx +2 -8
- package/lib/ocm/components/AddHosts/day2Wizard/Day2ClusterDetails.tsx +6 -11
- package/lib/ocm/components/AddHosts/day2Wizard/Day2StaticIpHostConfigurations.tsx +34 -19
- package/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContent.tsx +4 -36
- package/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabContentErrors.tsx +1 -15
- package/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +58 -3
- package/lib/ocm/components/clusterConfiguration/CustomManifestCheckbox.tsx +25 -32
- package/lib/ocm/components/clusterConfiguration/OcmBaseDomainField.tsx +23 -12
- package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +4 -5
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx +20 -27
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifests.tsx +3 -3
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsArray.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/CustomManifestsForm.tsx +69 -182
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/ExpandedManifest.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/utils.tsx +9 -15
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/data/dataTypes.ts +0 -1
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +7 -2
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts +6 -1
- package/lib/ocm/components/clusterDetail/ClusterDetailStatusMessages.tsx +2 -16
- package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +9 -16
- package/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +18 -16
- package/lib/ocm/components/clusterWizard/ClusterWizardContext.tsx +5 -3
- package/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +75 -54
- package/lib/ocm/hooks/index.ts +1 -0
- package/lib/ocm/hooks/useOpenshiftVersions.tsx +1 -15
- package/lib/ocm/hooks/useSupportLevelsAPI.ts +54 -2
- package/lib/ocm/hooks/useUISettings.ts +71 -0
- package/lib/ocm/services/ClusterDetailsService.ts +3 -5
- package/lib/ocm/services/ClustersService.ts +0 -10
- package/lib/ocm/services/Day2ClusterService.ts +17 -3
- package/lib/ocm/services/UISettingsService.ts +17 -0
- package/lib/ocm/services/index.ts +1 -0
- package/lib/ocm/services/types.ts +5 -0
- package/package.json +8 -4
|
@@ -6,27 +6,26 @@ import {
|
|
|
6
6
|
FieldArrayRenderProps,
|
|
7
7
|
Formik,
|
|
8
8
|
FormikConfig,
|
|
9
|
-
FormikErrors,
|
|
10
|
-
FormikHelpers,
|
|
11
9
|
useFormikContext,
|
|
12
10
|
yupToFormErrors,
|
|
13
11
|
} from 'formik';
|
|
14
12
|
import isEqual from 'lodash-es/isEqual.js';
|
|
15
|
-
import { ErrorState, LoadingState, useAlerts, useFormikAutoSave } from '../../../../../common';
|
|
16
|
-
import { CustomManifestsFormProps } from './propTypes';
|
|
17
13
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
ErrorState,
|
|
15
|
+
LoadingState,
|
|
16
|
+
getApiErrorMessage,
|
|
17
|
+
handleApiError,
|
|
18
|
+
useAlerts,
|
|
19
|
+
useFormikAutoSave,
|
|
20
|
+
} from '../../../../../common';
|
|
21
|
+
import { CustomManifestsFormProps } from './propTypes';
|
|
22
|
+
import { CustomManifestValues, ManifestFormData } from '../data/dataTypes';
|
|
25
23
|
import useClusterCustomManifests from '../../../../hooks/useClusterCustomManifests';
|
|
26
24
|
import { ClustersService } from '../../../../services';
|
|
27
25
|
import { CustomManifestsArray } from './CustomManifestsArray';
|
|
28
|
-
import { getManifestFakeId } from './utils';
|
|
29
26
|
import { selectCurrentClusterPermissionsState } from '../../../../store/slices/current-cluster/selectors';
|
|
27
|
+
import { useClusterWizardContext } from '../../../clusterWizard/ClusterWizardContext';
|
|
28
|
+
import { ClustersAPI } from '../../../../services/apis';
|
|
30
29
|
|
|
31
30
|
const fieldName = 'manifests';
|
|
32
31
|
|
|
@@ -53,55 +52,12 @@ const AutosaveWithParentUpdate = ({
|
|
|
53
52
|
return null;
|
|
54
53
|
};
|
|
55
54
|
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} => {
|
|
62
|
-
const existingFolderByFakeId = updatedManifest.fakeId?.substring(
|
|
63
|
-
0,
|
|
64
|
-
updatedManifest.fakeId.indexOf('#'),
|
|
65
|
-
);
|
|
66
|
-
const existingFolder: FormViewManifestFolder =
|
|
67
|
-
existingFolderByFakeId === 'manifests' || existingFolderByFakeId === 'openshift'
|
|
68
|
-
? existingFolderByFakeId
|
|
69
|
-
: 'manifests';
|
|
70
|
-
const existingFileName = updatedManifest.fakeId?.substring(
|
|
71
|
-
updatedManifest.fakeId.indexOf('#') + 1,
|
|
55
|
+
const manifestUpdated = (manifest: CustomManifestValues, oldManifest: CustomManifestValues) => {
|
|
56
|
+
return (
|
|
57
|
+
oldManifest.filename !== manifest.filename ||
|
|
58
|
+
oldManifest.folder !== manifest.folder ||
|
|
59
|
+
oldManifest.manifestYaml !== manifest.manifestYaml
|
|
72
60
|
);
|
|
73
|
-
|
|
74
|
-
return {
|
|
75
|
-
folderName: existingFolder,
|
|
76
|
-
fileName: existingFileName,
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const handleApiErrorInForm = (
|
|
81
|
-
manifests: CustomManifestValues[],
|
|
82
|
-
manifestsThatExists: CustomManifestValues[],
|
|
83
|
-
actions: FormikHelpers<ManifestFormData>,
|
|
84
|
-
) => {
|
|
85
|
-
const errors: FormikErrors<ManifestFormData> = {};
|
|
86
|
-
errors.manifests = [];
|
|
87
|
-
manifests.forEach((manifest) => {
|
|
88
|
-
(errors.manifests as FormikErrors<CustomManifestValues>[]).push({
|
|
89
|
-
fakeId: manifest.fakeId,
|
|
90
|
-
folder: '',
|
|
91
|
-
filename: '',
|
|
92
|
-
manifestYaml: '',
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
errors.manifests.forEach((errorManifest) => {
|
|
96
|
-
manifestsThatExists.forEach((updatedManifest) => {
|
|
97
|
-
if ((errorManifest as CustomManifestValues).fakeId === updatedManifest.fakeId) {
|
|
98
|
-
(errorManifest as CustomManifestValues).manifestYaml =
|
|
99
|
-
'Failed to update the existing manifest';
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
actions.setErrors(errors);
|
|
105
61
|
};
|
|
106
62
|
|
|
107
63
|
export const CustomManifestsForm = ({
|
|
@@ -115,142 +71,73 @@ export const CustomManifestsForm = ({
|
|
|
115
71
|
const [initialValues, setInitialValues] = React.useState<ManifestFormData | undefined>();
|
|
116
72
|
const { addAlert, clearAlerts } = useAlerts();
|
|
117
73
|
const { customManifests, isLoading, error } = useClusterCustomManifests(cluster.id || '', true);
|
|
118
|
-
const customManifestsLocalRef = React.useRef<
|
|
74
|
+
const customManifestsLocalRef = React.useRef<CustomManifestValues[]>([]);
|
|
75
|
+
const { updateUISettings, uiSettings } = useClusterWizardContext();
|
|
119
76
|
|
|
120
77
|
React.useEffect(() => {
|
|
121
|
-
if (customManifests) {
|
|
122
|
-
|
|
123
|
-
|
|
78
|
+
if (customManifests && !customManifestsLocalRef.current.length) {
|
|
79
|
+
const initValues = getInitialValues(customManifests);
|
|
80
|
+
setInitialValues(initValues);
|
|
81
|
+
customManifestsLocalRef.current = !!customManifests.length ? initValues.manifests : [];
|
|
124
82
|
}
|
|
125
83
|
}, [customManifests, getInitialValues]);
|
|
126
84
|
|
|
127
|
-
const updateCustomManifestsLocal = React.useCallback(
|
|
128
|
-
(updatedManifests: CustomManifestValues[], newValuesAdded: boolean) => {
|
|
129
|
-
if (newValuesAdded) {
|
|
130
|
-
updatedManifests.forEach((updatedManifest) => {
|
|
131
|
-
const customManifest: ManifestExtended = {
|
|
132
|
-
folder: updatedManifest.folder,
|
|
133
|
-
fileName: updatedManifest.filename,
|
|
134
|
-
yamlContent: updatedManifest.manifestYaml,
|
|
135
|
-
};
|
|
136
|
-
customManifestsLocalRef.current?.push(customManifest);
|
|
137
|
-
});
|
|
138
|
-
} else {
|
|
139
|
-
customManifestsLocalRef.current?.forEach((customManifest) => {
|
|
140
|
-
const updatedManifest: CustomManifestValues | undefined = updatedManifests.find(
|
|
141
|
-
(updatedManifest) =>
|
|
142
|
-
getManifestFakeId(
|
|
143
|
-
customManifest.folder || 'manifests',
|
|
144
|
-
customManifest.fileName || '',
|
|
145
|
-
) === updatedManifest.fakeId || '',
|
|
146
|
-
);
|
|
147
|
-
|
|
148
|
-
if (updatedManifest) {
|
|
149
|
-
customManifest.folder = updatedManifest.folder;
|
|
150
|
-
customManifest.fileName = updatedManifest.filename;
|
|
151
|
-
customManifest.yamlContent = updatedManifest.manifestYaml;
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
[customManifestsLocalRef],
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
const removeCustomManifestFromLocal = React.useCallback(
|
|
160
|
-
(manifests: CustomManifestValues[]) => {
|
|
161
|
-
if (customManifestsLocalRef.current) {
|
|
162
|
-
const customManifestsLocalCopy = [...customManifestsLocalRef.current].filter(
|
|
163
|
-
(customManifest) => {
|
|
164
|
-
return !manifests.some((manifest) => {
|
|
165
|
-
return (
|
|
166
|
-
customManifest.folder === manifest.folder &&
|
|
167
|
-
customManifest.fileName === manifest.filename &&
|
|
168
|
-
customManifest.yamlContent === manifest.manifestYaml
|
|
169
|
-
);
|
|
170
|
-
});
|
|
171
|
-
},
|
|
172
|
-
);
|
|
173
|
-
if (customManifestsLocalCopy.length > 0) {
|
|
174
|
-
customManifestsLocalRef.current.splice(
|
|
175
|
-
customManifestsLocalRef.current.findIndex(
|
|
176
|
-
(manifest) =>
|
|
177
|
-
manifest.folder === customManifestsLocalCopy[0].folder &&
|
|
178
|
-
manifest.fileName === customManifestsLocalCopy[0].fileName,
|
|
179
|
-
),
|
|
180
|
-
1,
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
[customManifestsLocalRef],
|
|
186
|
-
);
|
|
187
|
-
|
|
188
85
|
const handleSubmit: FormikConfig<ManifestFormData>['onSubmit'] = React.useCallback(
|
|
189
|
-
async (
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
const manifests = values.manifests;
|
|
193
|
-
const manifestsModified = manifests.filter(
|
|
194
|
-
(manifest) =>
|
|
195
|
-
!customManifestsLocalRef.current?.some(
|
|
196
|
-
(customManifest) =>
|
|
197
|
-
customManifest.folder === manifest.folder &&
|
|
198
|
-
customManifest.fileName === manifest.filename &&
|
|
199
|
-
customManifest.yamlContent === manifest.manifestYaml,
|
|
200
|
-
),
|
|
201
|
-
);
|
|
202
|
-
if (cluster && manifestsModified.length > 0) {
|
|
203
|
-
//See if manifests exists previously to make a patch or create a new one
|
|
204
|
-
const manifestsThatExists = manifestsModified.filter((manifest) => manifest.fakeId !== '');
|
|
205
|
-
const newManifestsToCreate = manifestsModified.filter((manifest) => manifest.fakeId === '');
|
|
206
|
-
try {
|
|
207
|
-
const manifestsRequests = manifestsThatExists.map((updatedManifest) => {
|
|
208
|
-
const { folderName, fileName } = getManifestDetails(updatedManifest);
|
|
86
|
+
async ({ manifests }, actions) => {
|
|
87
|
+
if (manifests.length < customManifestsLocalRef.current.length) {
|
|
88
|
+
// submit was triggered by deleting a manifest
|
|
209
89
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
90
|
+
customManifestsLocalRef.current = manifests;
|
|
91
|
+
return;
|
|
92
|
+
} else {
|
|
93
|
+
clearAlerts();
|
|
94
|
+
actions.setSubmitting(true);
|
|
95
|
+
|
|
96
|
+
for (let index = 0; index < manifests.length; index++) {
|
|
97
|
+
try {
|
|
98
|
+
const manifest = manifests[index];
|
|
99
|
+
if (index >= (customManifestsLocalRef.current?.length || 0)) {
|
|
100
|
+
// manifest added
|
|
101
|
+
await ClustersAPI.createCustomManifest(
|
|
102
|
+
cluster.id,
|
|
103
|
+
ClustersService.transformFormViewManifest(manifest),
|
|
104
|
+
);
|
|
105
|
+
} else {
|
|
106
|
+
// manifest updated
|
|
107
|
+
const oldManifest = customManifestsLocalRef.current[index];
|
|
108
|
+
|
|
109
|
+
if (manifestUpdated(manifest, oldManifest)) {
|
|
110
|
+
await ClustersService.updateCustomManifest(oldManifest, manifest, cluster.id);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
} catch (error) {
|
|
114
|
+
const errorArray = new Array(manifests.length).fill(undefined);
|
|
115
|
+
errorArray.splice(index, 1, { manifestYaml: 'Failed to save changes' });
|
|
116
|
+
|
|
117
|
+
const errors = {
|
|
118
|
+
manifests: errorArray,
|
|
214
119
|
};
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
120
|
+
actions.setErrors(errors);
|
|
121
|
+
|
|
122
|
+
// handleApiErrorInForm(manifests, customManifestsLocalRef.current, actions);
|
|
123
|
+
handleApiError(error, () =>
|
|
124
|
+
addAlert({
|
|
125
|
+
title: 'Failed to update the custom manifests',
|
|
126
|
+
message: getApiErrorMessage(error),
|
|
127
|
+
}),
|
|
220
128
|
);
|
|
221
|
-
});
|
|
222
|
-
await Promise.all(manifestsRequests);
|
|
223
|
-
if (newManifestsToCreate.length > 0) {
|
|
224
|
-
await ClustersService.createClusterManifests(newManifestsToCreate, cluster?.id);
|
|
225
|
-
updateCustomManifestsLocal(newManifestsToCreate, true);
|
|
226
129
|
}
|
|
130
|
+
}
|
|
227
131
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
} catch (e) {
|
|
232
|
-
handleApiErrorInForm(manifests, manifestsThatExists, actions);
|
|
233
|
-
handleApiError(e, () =>
|
|
234
|
-
addAlert({
|
|
235
|
-
title: 'Failed to update the custom manifests',
|
|
236
|
-
message: getApiErrorMessage(e),
|
|
237
|
-
}),
|
|
238
|
-
);
|
|
239
|
-
} finally {
|
|
240
|
-
actions.setSubmitting(false);
|
|
132
|
+
customManifestsLocalRef.current = manifests;
|
|
133
|
+
if (!uiSettings?.customManifestsAdded) {
|
|
134
|
+
await updateUISettings({ customManifestsAdded: true });
|
|
241
135
|
}
|
|
242
|
-
|
|
243
|
-
|
|
136
|
+
|
|
137
|
+
actions.setSubmitting(false);
|
|
244
138
|
}
|
|
245
139
|
},
|
|
246
|
-
[
|
|
247
|
-
addAlert,
|
|
248
|
-
clearAlerts,
|
|
249
|
-
cluster,
|
|
250
|
-
customManifestsLocalRef,
|
|
251
|
-
updateCustomManifestsLocal,
|
|
252
|
-
removeCustomManifestFromLocal,
|
|
253
|
-
],
|
|
140
|
+
[clearAlerts, uiSettings?.customManifestsAdded, cluster.id, addAlert, updateUISettings],
|
|
254
141
|
);
|
|
255
142
|
|
|
256
143
|
const onSubmit = isViewerMode ? () => Promise.resolve() : handleSubmit;
|
|
@@ -50,7 +50,7 @@ const ExpandedManifest = ({ fieldName, manifestIdx }: CustomManifestComponentPro
|
|
|
50
50
|
)}.`}
|
|
51
51
|
label={
|
|
52
52
|
<>
|
|
53
|
-
<span>File name</span>
|
|
53
|
+
<span>File name</span>{' '}
|
|
54
54
|
<PopoverIcon
|
|
55
55
|
bodyContent={
|
|
56
56
|
'File name determines order of executing manifests during the installation. For example "manifest1.yaml" will be applied before "manifest2.yaml"'
|
|
@@ -8,25 +8,24 @@ export const getFormData = (manifests: ListManifestsExtended): ManifestFormData
|
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const getEmptyManifest = (): CustomManifestValues => {
|
|
12
12
|
return {
|
|
13
13
|
folder: 'manifests',
|
|
14
14
|
filename: '',
|
|
15
15
|
manifestYaml: '',
|
|
16
|
-
fakeId: '',
|
|
17
16
|
};
|
|
18
17
|
};
|
|
19
18
|
|
|
20
|
-
export const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
export const getManifestValues = (manifests: ListManifestsExtended): ManifestFormData => {
|
|
20
|
+
if (!!manifests.length) {
|
|
21
|
+
return getFormData(manifests);
|
|
22
|
+
} else {
|
|
23
|
+
return getEmptyManifestsValues();
|
|
24
24
|
}
|
|
25
|
-
return { manifests: formData.manifests };
|
|
26
25
|
};
|
|
27
26
|
|
|
28
|
-
export const
|
|
29
|
-
return { manifests: [
|
|
27
|
+
export const getEmptyManifestsValues = (): ManifestFormData => {
|
|
28
|
+
return { manifests: [getEmptyManifest()] };
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
export const getClusterCustomManifests = (
|
|
@@ -37,13 +36,8 @@ export const getClusterCustomManifests = (
|
|
|
37
36
|
folder: manifest.folder || 'manifests',
|
|
38
37
|
filename: manifest.fileName || '',
|
|
39
38
|
manifestYaml: manifest.yamlContent || '',
|
|
40
|
-
fakeId: getManifestFakeId(manifest.folder || 'manifests', manifest.fileName || ''),
|
|
41
39
|
}));
|
|
42
40
|
} else {
|
|
43
|
-
return [
|
|
41
|
+
return [getEmptyManifest()];
|
|
44
42
|
}
|
|
45
43
|
};
|
|
46
|
-
|
|
47
|
-
export const getManifestFakeId = (folder: string, fileName: string): string => {
|
|
48
|
-
return `${folder}#${fileName}`;
|
|
49
|
-
};
|
package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx
CHANGED
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
InfraEnv,
|
|
47
47
|
V2ClusterUpdateParams,
|
|
48
48
|
} from '@openshift-assisted/types/assisted-installer-service';
|
|
49
|
+
import { useNewFeatureSupportLevel } from '../../../../common/components/newFeatureSupportLevels';
|
|
49
50
|
|
|
50
51
|
const NetworkConfigurationForm: React.FC<{
|
|
51
52
|
cluster: Cluster;
|
|
@@ -157,10 +158,14 @@ const NetworkConfigurationPage = ({ cluster }: { cluster: Cluster }) => {
|
|
|
157
158
|
const { addAlert, clearAlerts, alerts } = useAlerts();
|
|
158
159
|
const dispatch = useDispatch();
|
|
159
160
|
const { isViewerMode } = useSelector(selectCurrentClusterPermissionsState);
|
|
160
|
-
|
|
161
161
|
const hostSubnets = React.useMemo(() => getHostSubnets(cluster, true), [cluster]);
|
|
162
|
+
const featureSupportLevelData = useNewFeatureSupportLevel();
|
|
163
|
+
const isClusterManagedNetworkingUnsupported = !featureSupportLevelData.isFeatureSupported(
|
|
164
|
+
'CLUSTER_MANAGED_NETWORKING',
|
|
165
|
+
);
|
|
162
166
|
const initialValues = React.useMemo(
|
|
163
|
-
() =>
|
|
167
|
+
() =>
|
|
168
|
+
getNetworkInitialValues(cluster, defaultNetworkValues, isClusterManagedNetworkingUnsupported),
|
|
164
169
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
165
170
|
[], // just once, Formik does not reinitialize
|
|
166
171
|
);
|
|
@@ -31,6 +31,7 @@ export const getNetworkInitialValues = (
|
|
|
31
31
|
| 'serviceNetworksIpv4'
|
|
32
32
|
| 'serviceNetworksDualstack'
|
|
33
33
|
>,
|
|
34
|
+
isClusterManagedNetworkingUnsupported: boolean,
|
|
34
35
|
): NetworkConfigurationValues => {
|
|
35
36
|
const isSNOCluster = isSNO(cluster);
|
|
36
37
|
const isDualStackType = isDualStack(cluster);
|
|
@@ -40,7 +41,11 @@ export const getNetworkInitialValues = (
|
|
|
40
41
|
ingressVips: cluster.ingressVips,
|
|
41
42
|
sshPublicKey: cluster.sshPublicKey || '',
|
|
42
43
|
vipDhcpAllocation: cluster.vipDhcpAllocation,
|
|
43
|
-
managedNetworkingType:
|
|
44
|
+
managedNetworkingType:
|
|
45
|
+
(cluster.apiVips && cluster.apiVips.length === 0 && isClusterManagedNetworkingUnsupported) ||
|
|
46
|
+
isSNOCluster
|
|
47
|
+
? 'userManaged'
|
|
48
|
+
: 'clusterManaged',
|
|
44
49
|
networkType: cluster.networkType || getDefaultNetworkType(isSNOCluster, isDualStackType),
|
|
45
50
|
machineNetworks: cluster.machineNetworks || [],
|
|
46
51
|
stackType: isDualStackType ? DUAL_STACK : IPV4_STACK,
|
|
@@ -15,6 +15,7 @@ import { isInOcm } from '../../api';
|
|
|
15
15
|
import { ExternalPlatformLinks } from '../clusterConfiguration/platformIntegration/constants';
|
|
16
16
|
import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels';
|
|
17
17
|
import { Cluster, PlatformType } from '@openshift-assisted/types/assisted-installer-service';
|
|
18
|
+
import PostInstallAlert from '../../../common/components/clusterDetail/PostInstallAlert';
|
|
18
19
|
|
|
19
20
|
type ClusterDetailStatusMessagesProps = {
|
|
20
21
|
cluster: Cluster;
|
|
@@ -76,22 +77,7 @@ const ClusterDetailStatusMessages = ({
|
|
|
76
77
|
}
|
|
77
78
|
/>
|
|
78
79
|
</RenderIf>
|
|
79
|
-
<
|
|
80
|
-
<Alert
|
|
81
|
-
variant="warning"
|
|
82
|
-
isInline
|
|
83
|
-
data-testid="alert-modify-platform-config"
|
|
84
|
-
title={
|
|
85
|
-
<p>
|
|
86
|
-
Modify your platform configuration to access your platform's features directly in
|
|
87
|
-
OpenShift.{' '}
|
|
88
|
-
<a href={platformLink} target="_blank" rel="noopener noreferrer">
|
|
89
|
-
Learn more about configuration <i className="fas fa-external-link-alt" />
|
|
90
|
-
</a>
|
|
91
|
-
</p>
|
|
92
|
-
}
|
|
93
|
-
/>
|
|
94
|
-
</RenderIf>
|
|
80
|
+
{platformLink && <PostInstallAlert link={platformLink} />}
|
|
95
81
|
</>
|
|
96
82
|
);
|
|
97
83
|
};
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
ClusterDetailsUpdateParams,
|
|
16
16
|
ClustersService,
|
|
17
17
|
ClusterCreateParamsWithStaticNetworking,
|
|
18
|
+
UISettingService,
|
|
18
19
|
} from '../../services';
|
|
19
|
-
import useClusterCustomManifests from '../../hooks/useClusterCustomManifests';
|
|
20
20
|
import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service';
|
|
21
21
|
|
|
22
22
|
type ClusterDetailsProps = {
|
|
@@ -33,10 +33,13 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
33
33
|
const { usedClusterNames } = useUsedClusterNames(cluster?.id || '');
|
|
34
34
|
const pullSecret = usePullSecret();
|
|
35
35
|
const { error: errorOCPVersions, loading: loadingOCPVersions, versions } = useOpenshiftVersions();
|
|
36
|
-
const { customManifests } = useClusterCustomManifests(cluster?.id || '', false);
|
|
37
36
|
|
|
38
37
|
const handleClusterUpdate = React.useCallback(
|
|
39
|
-
async (
|
|
38
|
+
async (
|
|
39
|
+
clusterId: Cluster['id'],
|
|
40
|
+
params: ClusterDetailsUpdateParams,
|
|
41
|
+
addCustomManifests: boolean,
|
|
42
|
+
) => {
|
|
40
43
|
clearAlerts();
|
|
41
44
|
|
|
42
45
|
try {
|
|
@@ -45,6 +48,7 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
45
48
|
cluster?.tags,
|
|
46
49
|
params,
|
|
47
50
|
);
|
|
51
|
+
await clusterWizardContext.updateUISettings({ addCustomManifests });
|
|
48
52
|
dispatch(updateCluster(updatedCluster));
|
|
49
53
|
|
|
50
54
|
canNextClusterDetails({ cluster: updatedCluster }) && clusterWizardContext.moveNext();
|
|
@@ -60,23 +64,13 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
60
64
|
[clearAlerts, addAlert, dispatch, cluster?.tags, clusterWizardContext],
|
|
61
65
|
);
|
|
62
66
|
|
|
63
|
-
const handleCustomManifestsChange = React.useCallback(
|
|
64
|
-
async (clusterId: string, addCustomManifests: boolean) => {
|
|
65
|
-
const addCustomManifestsNew = customManifests ? customManifests.length === 0 : true;
|
|
66
|
-
if (addCustomManifests && addCustomManifestsNew && clusterId) {
|
|
67
|
-
await ClustersService.createDummyManifest(clusterId);
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
[customManifests],
|
|
71
|
-
);
|
|
72
|
-
|
|
73
67
|
const handleClusterCreate = React.useCallback(
|
|
74
68
|
async (params: ClusterCreateParamsWithStaticNetworking, addCustomManifests: boolean) => {
|
|
75
69
|
clearAlerts();
|
|
76
70
|
try {
|
|
77
71
|
const cluster = await ClustersService.create(params);
|
|
78
72
|
history.push(`${routeBasePath}/clusters/${cluster.id}`, ClusterWizardFlowStateNew);
|
|
79
|
-
await
|
|
73
|
+
await UISettingService.update(cluster.id, { addCustomManifests });
|
|
80
74
|
} catch (e) {
|
|
81
75
|
handleApiError(e, () =>
|
|
82
76
|
addAlert({ title: 'Failed to create new cluster', message: getApiErrorMessage(e) }),
|
|
@@ -86,7 +80,7 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
86
80
|
}
|
|
87
81
|
}
|
|
88
82
|
},
|
|
89
|
-
[clearAlerts, addAlert, dispatch
|
|
83
|
+
[clearAlerts, history, addAlert, dispatch],
|
|
90
84
|
);
|
|
91
85
|
|
|
92
86
|
const navigation = <ClusterWizardNavigation cluster={cluster} />;
|
|
@@ -116,7 +110,6 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
116
110
|
moveNext={() => clusterWizardContext.moveNext()}
|
|
117
111
|
handleClusterUpdate={handleClusterUpdate}
|
|
118
112
|
handleClusterCreate={handleClusterCreate}
|
|
119
|
-
handleCustomManifestsChange={handleCustomManifestsChange}
|
|
120
113
|
navigation={navigation}
|
|
121
114
|
infraEnv={infraEnv}
|
|
122
115
|
/>
|
|
@@ -46,9 +46,6 @@ type ClusterDetailsFormProps = {
|
|
|
46
46
|
handleClusterUpdate: (
|
|
47
47
|
clusterId: Cluster['id'],
|
|
48
48
|
params: ClusterDetailsUpdateParams,
|
|
49
|
-
) => Promise<void>;
|
|
50
|
-
handleCustomManifestsChange: (
|
|
51
|
-
clusterId: Cluster['id'],
|
|
52
49
|
addCustomManifests: boolean,
|
|
53
50
|
) => Promise<void>;
|
|
54
51
|
};
|
|
@@ -64,7 +61,6 @@ const ClusterDetailsForm = (props: ClusterDetailsFormProps) => {
|
|
|
64
61
|
moveNext,
|
|
65
62
|
handleClusterUpdate,
|
|
66
63
|
handleClusterCreate,
|
|
67
|
-
handleCustomManifestsChange,
|
|
68
64
|
navigation,
|
|
69
65
|
} = props;
|
|
70
66
|
|
|
@@ -73,6 +69,7 @@ const ClusterDetailsForm = (props: ClusterDetailsFormProps) => {
|
|
|
73
69
|
const { isViewerMode } = useSelector(selectCurrentClusterPermissionsState);
|
|
74
70
|
const featureSupportLevels = useNewFeatureSupportLevel();
|
|
75
71
|
const { clearAlerts } = useAlerts();
|
|
72
|
+
|
|
76
73
|
const handleSubmit = React.useCallback(
|
|
77
74
|
async (values: OcmClusterDetailsValues) => {
|
|
78
75
|
if (cluster) {
|
|
@@ -86,20 +83,13 @@ const ClusterDetailsForm = (props: ClusterDetailsFormProps) => {
|
|
|
86
83
|
resetPlatform = 'baremetal';
|
|
87
84
|
}
|
|
88
85
|
const params = ClusterDetailsService.getClusterUpdateParams(values, resetPlatform);
|
|
89
|
-
await handleClusterUpdate(cluster.id, params);
|
|
90
|
-
await handleCustomManifestsChange(cluster.id, clusterWizardContext.addCustomManifests);
|
|
86
|
+
await handleClusterUpdate(cluster.id, params, values.addCustomManifest);
|
|
91
87
|
} else {
|
|
92
88
|
const params = ClusterDetailsService.getClusterCreateParams(values);
|
|
93
|
-
await handleClusterCreate(params,
|
|
89
|
+
await handleClusterCreate(params, values.addCustomManifest);
|
|
94
90
|
}
|
|
95
91
|
},
|
|
96
|
-
[
|
|
97
|
-
cluster,
|
|
98
|
-
handleClusterCreate,
|
|
99
|
-
handleClusterUpdate,
|
|
100
|
-
handleCustomManifestsChange,
|
|
101
|
-
clusterWizardContext.addCustomManifests,
|
|
102
|
-
],
|
|
92
|
+
[cluster, handleClusterCreate, handleClusterUpdate],
|
|
103
93
|
);
|
|
104
94
|
|
|
105
95
|
const handleOnNext = React.useCallback(
|
|
@@ -129,8 +119,17 @@ const ClusterDetailsForm = (props: ClusterDetailsFormProps) => {
|
|
|
129
119
|
managedDomains,
|
|
130
120
|
ocpVersions,
|
|
131
121
|
urlSearchParams: search,
|
|
122
|
+
addCustomManifests: clusterWizardContext.customManifestsStep,
|
|
132
123
|
}),
|
|
133
|
-
[
|
|
124
|
+
[
|
|
125
|
+
infraEnv,
|
|
126
|
+
cluster,
|
|
127
|
+
pullSecret,
|
|
128
|
+
managedDomains,
|
|
129
|
+
ocpVersions,
|
|
130
|
+
search,
|
|
131
|
+
clusterWizardContext.customManifestsStep,
|
|
132
|
+
],
|
|
134
133
|
);
|
|
135
134
|
|
|
136
135
|
const { t } = useTranslation();
|
|
@@ -146,7 +145,10 @@ const ClusterDetailsForm = (props: ClusterDetailsFormProps) => {
|
|
|
146
145
|
return (
|
|
147
146
|
<Formik
|
|
148
147
|
initialValues={initialValues}
|
|
149
|
-
validate={
|
|
148
|
+
validate={(values) => {
|
|
149
|
+
clearAlerts();
|
|
150
|
+
return getRichTextValidation(validationSchema)(values);
|
|
151
|
+
}}
|
|
150
152
|
onSubmit={handleSubmit}
|
|
151
153
|
>
|
|
152
154
|
{({ submitForm, isSubmitting, isValid, dirty, errors, touched }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { HostsNetworkConfigurationType } from '../../services';
|
|
2
|
+
import { HostsNetworkConfigurationType, UISettingsValues } from '../../services';
|
|
3
3
|
import { StaticIpView } from '../clusterConfiguration/staticIp/data/dataTypes';
|
|
4
4
|
import { ClusterWizardStepsType } from './wizardTransition';
|
|
5
5
|
|
|
@@ -11,10 +11,12 @@ export type ClusterWizardContextType = {
|
|
|
11
11
|
wizardStepIds: ClusterWizardStepsType[];
|
|
12
12
|
onUpdateStaticIpView(view: StaticIpView): void;
|
|
13
13
|
onUpdateHostNetworkConfigType(type: HostsNetworkConfigurationType): void;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
setCustomManifestsStep(addCustomManifest: boolean): void;
|
|
15
|
+
customManifestsStep: boolean;
|
|
16
16
|
wizardPerPage: number;
|
|
17
17
|
setWizardPerPage: (perPage: number) => void;
|
|
18
|
+
updateUISettings: (data: UISettingsValues) => Promise<void>;
|
|
19
|
+
uiSettings?: UISettingsValues;
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
export const ClusterWizardContext = React.createContext<ClusterWizardContextType | null>(null);
|