@openshift-assisted/ui-lib 2.52.2 → 2.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/NetworkConfiguration.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/NetworkConfiguration.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.d.ts +5 -0
- package/build/@types/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/types.d.ts +0 -1
- package/build/@types/cim/components/ClusterDeployment/types.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts +4 -4
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
- package/build/@types/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/clusterDeployment.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts +2 -2
- package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.test.d.ts +2 -0
- package/build/@types/cim/components/helpers/versions.test.d.ts.map +1 -0
- package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/CimConfiguration/persist.d.ts +14 -17
- package/build/@types/cim/components/modals/CimConfiguration/persist.d.ts.map +1 -1
- package/build/@types/cim/hooks/index.d.ts +1 -0
- package/build/@types/cim/hooks/index.d.ts.map +1 -1
- package/build/@types/cim/hooks/useAgents.d.ts +4 -0
- package/build/@types/cim/hooks/useAgents.d.ts.map +1 -0
- 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/components/clusterDetail/ClusterCredentials.d.ts.map +1 -1
- package/build/@types/common/components/clusterDetail/ConsoleModal.d.ts +0 -5
- package/build/@types/common/components/clusterDetail/ConsoleModal.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/customManifests/CustomManifestsAlert.d.ts +6 -0
- package/build/@types/common/components/clusterWizard/customManifests/CustomManifestsAlert.d.ts.map +1 -0
- package/build/@types/common/components/clusterWizard/customManifests/index.d.ts +2 -0
- package/build/@types/common/components/clusterWizard/customManifests/index.d.ts.map +1 -0
- package/build/@types/common/components/clusterWizard/index.d.ts +2 -0
- package/build/@types/common/components/clusterWizard/index.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.d.ts +2 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.d.ts +2 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.d.ts +3 -0
- package/build/@types/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.d.ts.map +1 -0
- package/build/@types/common/components/clusterWizard/networkingSteps/index.d.ts +1 -0
- package/build/@types/common/components/clusterWizard/networkingSteps/index.d.ts.map +1 -1
- package/build/@types/common/components/hosts/HostsTable.d.ts.map +1 -1
- package/build/@types/common/components/ui/WizardFooter.d.ts +1 -0
- package/build/@types/common/components/ui/WizardFooter.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/utils.d.ts +1 -0
- package/build/@types/common/components/ui/formik/utils.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts +2 -2
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/types/networkType.d.ts +2 -1
- package/build/@types/common/types/networkType.d.ts.map +1 -1
- package/build/@types/common/validationSchemas/networkingValidation.d.ts +10 -0
- package/build/@types/common/validationSchemas/networkingValidation.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.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/NetworkTypeDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewSummary.d.ts.map +1 -1
- package/build/@types/ocm/components/{clusterDetail/ClusterProperties.d.ts → clusterConfiguration/review/utils.d.ts} +1 -8
- package/build/@types/ocm/components/clusterConfiguration/review/utils.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/review/utils.test.d.ts +2 -0
- package/build/@types/ocm/components/clusterConfiguration/review/utils.test.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateTypes.d.ts +1 -0
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateTypes.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.d.ts +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/ClusterDetailsButtonGroup.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/index.d.ts +0 -1
- package/build/@types/ocm/components/clusterDetail/index.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetailsForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/HostDiscovery.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/AssistedInstallerHeader.d.ts +5 -1
- package/build/@types/ocm/components/clusters/AssistedInstallerHeader.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/ClustersTable.d.ts.map +1 -1
- package/build/@types/ocm/components/hosts/HostsTableEmptyState.d.ts.map +1 -1
- package/build/@types/ocm/hooks/useClusterCustomManifests.d.ts.map +1 -1
- package/build/@types/ocm/hooks/useLateBinding.d.ts.map +1 -1
- package/build/@types/ocm/hooks/useUISettings.d.ts.map +1 -1
- package/build/@types/ocm/services/ClusterDetailsService.d.ts +2 -1
- package/build/@types/ocm/services/ClusterDetailsService.d.ts.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js +9 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js +46 -7
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.js +22 -21
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js +25 -9
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.js +35 -0
- package/build/cjs/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.js +4 -4
- package/build/cjs/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js +13 -18
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/wizardTransition.js +5 -1
- package/build/cjs/cim/components/ClusterDeployment/wizardTransition.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/modals/NodePoolForm.js +1 -1
- package/build/cjs/cim/components/Hypershift/modals/NodePoolForm.js.map +1 -1
- package/build/cjs/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.js +1 -4
- package/build/cjs/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.js.map +1 -1
- package/build/cjs/cim/components/helpers/clusterDeployment.js +14 -10
- package/build/cjs/cim/components/helpers/clusterDeployment.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +39 -28
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.test.js +423 -0
- package/build/cjs/cim/components/helpers/versions.test.js.map +1 -0
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js +39 -16
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/persist.js +96 -136
- package/build/cjs/cim/components/modals/CimConfiguration/persist.js.map +1 -1
- package/build/cjs/cim/hooks/index.js +1 -0
- package/build/cjs/cim/hooks/index.js.map +1 -1
- package/build/cjs/cim/hooks/useAgents.js +13 -0
- package/build/cjs/cim/hooks/useAgents.js.map +1 -0
- package/build/cjs/common/components/clusterDetail/ClusterCredentials.js +10 -9
- package/build/cjs/common/components/clusterDetail/ClusterCredentials.js.map +1 -1
- package/build/cjs/common/components/clusterDetail/ConsoleModal.js +1 -10
- package/build/cjs/common/components/clusterDetail/ConsoleModal.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/customManifests/CustomManifestsAlert.js +32 -0
- package/build/cjs/common/components/clusterWizard/customManifests/CustomManifestsAlert.js.map +1 -0
- package/build/cjs/common/components/clusterWizard/customManifests/index.js +5 -0
- package/build/cjs/common/components/clusterWizard/customManifests/index.js.map +1 -0
- package/build/cjs/common/components/clusterWizard/index.js +2 -0
- package/build/cjs/common/components/clusterWizard/index.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js +8 -2
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.js +2 -2
- package/build/cjs/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.js +29 -19
- package/build/cjs/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.js +20 -0
- package/build/cjs/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.js.map +1 -0
- package/build/cjs/common/components/clusterWizard/networkingSteps/index.js +1 -0
- package/build/cjs/common/components/clusterWizard/networkingSteps/index.js.map +1 -1
- package/build/cjs/common/components/hosts/HostsTable.js +2 -1
- package/build/cjs/common/components/hosts/HostsTable.js.map +1 -1
- package/build/cjs/common/components/ui/WizardFooter.js +6 -1
- package/build/cjs/common/components/ui/WizardFooter.js.map +1 -1
- package/build/cjs/common/components/ui/formik/utils.js +5 -1
- package/build/cjs/common/components/ui/formik/utils.js.map +1 -1
- package/build/cjs/common/config/constants.js +13 -2
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/types/networkType.js +9 -8
- package/build/cjs/common/types/networkType.js.map +1 -1
- package/build/cjs/common/validationSchemas/networkingValidation.js +19 -1
- package/build/cjs/common/validationSchemas/networkingValidation.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +4 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js +1 -20
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +7 -6
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.js +6 -9
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js +4 -4
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.js +2 -2
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.js +6 -5
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js +5 -2
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewSummary.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.js +57 -0
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.js.map +1 -0
- package/build/cjs/ocm/components/{clusterDetail/ClusterProperties.test.js → clusterConfiguration/review/utils.test.js} +13 -13
- package/build/cjs/ocm/components/clusterConfiguration/review/utils.test.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js +2 -2
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateTypes.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.js +3 -7
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js +8 -2
- package/build/cjs/ocm/components/clusterDetail/ClusterDetailsButtonGroup.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/index.js +1 -3
- package/build/cjs/ocm/components/clusterDetail/index.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js +10 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js +4 -1
- package/build/cjs/ocm/components/clusterWizard/HostDiscovery.js.map +1 -1
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js +2 -2
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClusterPage.js +1 -1
- package/build/cjs/ocm/components/clusters/ClusterPage.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClustersTable.js +3 -2
- package/build/cjs/ocm/components/clusters/ClustersTable.js.map +1 -1
- package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +1 -1
- package/build/cjs/ocm/components/hosts/HostsTableEmptyState.js +2 -1
- package/build/cjs/ocm/components/hosts/HostsTableEmptyState.js.map +1 -1
- package/build/cjs/ocm/hooks/useClusterCustomManifests.js +3 -15
- package/build/cjs/ocm/hooks/useClusterCustomManifests.js.map +1 -1
- package/build/cjs/ocm/hooks/useLateBinding.js +41 -26
- package/build/cjs/ocm/hooks/useLateBinding.js.map +1 -1
- package/build/cjs/ocm/hooks/usePullSecret.js +2 -2
- package/build/cjs/ocm/hooks/useUISettings.js +1 -1
- package/build/cjs/ocm/hooks/useUISettings.js.map +1 -1
- package/build/cjs/ocm/services/ClusterDetailsService.js +4 -2
- package/build/cjs/ocm/services/ClusterDetailsService.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizard.tsx +10 -2
- package/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx +55 -6
- package/lib/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.tsx +18 -2
- package/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts +22 -8
- package/lib/cim/components/ClusterDeployment/networking/NetworkTypeDropdown.tsx +81 -0
- package/lib/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.tsx +18 -14
- package/lib/cim/components/ClusterDeployment/types.ts +0 -1
- package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +14 -22
- package/lib/cim/components/ClusterDeployment/wizardTransition.ts +5 -1
- package/lib/cim/components/Hypershift/modals/NodePoolForm.tsx +2 -2
- package/lib/cim/components/featureSupportLevels/ACMFeatureSupportLevelProvider.tsx +2 -5
- package/lib/cim/components/helpers/clusterDeployment.ts +9 -4
- package/lib/cim/components/helpers/versions.test.ts +465 -0
- package/lib/cim/components/helpers/versions.ts +37 -31
- package/lib/cim/components/modals/CimConfiguration/CimConfigurationModal.tsx +45 -18
- package/lib/cim/components/modals/CimConfiguration/persist.ts +97 -199
- package/lib/cim/hooks/index.tsx +1 -0
- package/lib/cim/hooks/useAgents.tsx +15 -0
- package/lib/cim/types/k8s/agent-cluster-install.ts +1 -1
- package/lib/common/components/clusterDetail/ClusterCredentials.tsx +49 -53
- package/lib/common/components/clusterDetail/ConsoleModal.tsx +0 -35
- package/lib/common/components/clusterWizard/customManifests/CustomManifestsAlert.tsx +39 -0
- package/lib/common/components/clusterWizard/customManifests/index.tsx +1 -0
- package/lib/common/components/clusterWizard/index.ts +2 -0
- package/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx +8 -1
- package/lib/common/components/clusterWizard/networkingSteps/ManagedNetworkingControlGroup.tsx +2 -2
- package/lib/common/components/clusterWizard/networkingSteps/StackTypeControlGroup.tsx +36 -26
- package/lib/common/components/clusterWizard/networkingSteps/ThirdPartyCNIBanner.tsx +28 -0
- package/lib/common/components/clusterWizard/networkingSteps/index.ts +1 -0
- package/lib/common/components/hosts/HostsTable.tsx +2 -0
- package/lib/common/components/ui/WizardFooter.tsx +10 -0
- package/lib/common/components/ui/formik/utils.ts +6 -0
- package/lib/common/config/constants.ts +14 -1
- package/lib/common/types/networkType.ts +9 -8
- package/lib/common/validationSchemas/networkingValidation.tsx +39 -1
- package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +6 -3
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/CustomManifestsPage.tsx +10 -45
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +11 -9
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkTypeDropdown.tsx +7 -24
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts +6 -5
- package/lib/ocm/components/clusterConfiguration/review/ReviewClusterDetailTable.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.tsx +10 -4
- package/lib/ocm/components/clusterConfiguration/review/ReviewSummary.tsx +9 -2
- package/lib/ocm/components/{clusterDetail/ClusterProperties.test.ts → clusterConfiguration/review/utils.test.ts} +1 -1
- package/lib/ocm/components/clusterConfiguration/review/utils.tsx +61 -0
- package/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts +2 -0
- package/lib/ocm/components/clusterConfiguration/staticIp/data/nmstateTypes.ts +1 -0
- package/lib/ocm/components/clusterConfiguration/staticIp/data/nmstateYaml.ts +2 -0
- package/lib/ocm/components/clusterDetail/ClusterDetailsButtonGroup.tsx +27 -2
- package/lib/ocm/components/clusterDetail/index.ts +0 -1
- package/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +10 -1
- package/lib/ocm/components/clusterWizard/HostDiscovery.tsx +4 -0
- package/lib/ocm/components/clusters/AssistedInstallerHeader.tsx +6 -2
- package/lib/ocm/components/clusters/ClusterPage.tsx +1 -1
- package/lib/ocm/components/clusters/ClustersTable.tsx +59 -49
- package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +1 -1
- package/lib/ocm/components/hosts/HostsTableEmptyState.tsx +2 -0
- package/lib/ocm/hooks/useClusterCustomManifests.ts +3 -0
- package/lib/ocm/hooks/useLateBinding.ts +45 -24
- package/lib/ocm/hooks/usePullSecret.ts +2 -2
- package/lib/ocm/hooks/useUISettings.ts +3 -1
- package/lib/ocm/services/ClusterDetailsService.ts +6 -0
- package/package.json +9 -9
- package/build/@types/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.d.ts +0 -7
- package/build/@types/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.d.ts +0 -8
- package/build/@types/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterDetail/ClusterProperties.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterDetail/ClusterProperties.test.d.ts +0 -2
- package/build/@types/ocm/components/clusterDetail/ClusterProperties.test.d.ts.map +0 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js +0 -33
- package/build/cjs/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.js.map +0 -1
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js +0 -40
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.js.map +0 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.js +0 -77
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.js.map +0 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.test.js.map +0 -1
- package/lib/common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup.tsx +0 -74
- package/lib/ocm/components/clusterDetail/AssistedInstallerExtraDetailCard.tsx +0 -69
- package/lib/ocm/components/clusterDetail/ClusterProperties.tsx +0 -169
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
k8sListItems,
|
|
5
5
|
k8sPatch,
|
|
6
6
|
K8sResourceCommon,
|
|
7
|
+
Patch,
|
|
7
8
|
} from '@openshift-console/dynamic-plugin-sdk';
|
|
8
|
-
import { AlertVariant } from '@patternfly/react-core';
|
|
9
9
|
import { TFunction } from 'i18next';
|
|
10
10
|
import { getErrorMessage } from '../../../../common/utils';
|
|
11
11
|
|
|
@@ -13,42 +13,21 @@ import {
|
|
|
13
13
|
AgentServiceConfigK8sResource,
|
|
14
14
|
AgentServiceConfigModel,
|
|
15
15
|
IngressControllerModel,
|
|
16
|
-
K8sPatch,
|
|
17
16
|
ProvisioningModel,
|
|
18
17
|
RouteK8sResource,
|
|
19
18
|
RouteModel,
|
|
20
19
|
} from '../../../types';
|
|
21
|
-
import { LOCAL_STORAGE_ID_LAST_UPDATE_TIMESTAMP } from './utils';
|
|
22
20
|
import { appendPatch } from '../../../utils';
|
|
23
|
-
|
|
24
|
-
export type SetErrorFuncType = ({
|
|
25
|
-
title,
|
|
26
|
-
message,
|
|
27
|
-
variant,
|
|
28
|
-
}: {
|
|
29
|
-
title: string;
|
|
30
|
-
message?: string;
|
|
31
|
-
variant?: AlertVariant;
|
|
32
|
-
}) => void;
|
|
21
|
+
import { CimConfigurationValues } from './types';
|
|
33
22
|
|
|
34
23
|
const ASSISTED_IMAGE_SERVICE_ROUTE_PREFIX = 'assisted-image-service-multicluster-engine';
|
|
35
24
|
|
|
36
|
-
|
|
37
|
-
// Find assisted-image-service's one and parse domain from there.
|
|
38
|
-
const getAssistedImageServiceRoute = async (
|
|
39
|
-
t: TFunction,
|
|
40
|
-
setError: SetErrorFuncType,
|
|
41
|
-
): Promise<RouteK8sResource | undefined> => {
|
|
25
|
+
const getAssistedImageServiceRoute = async (t: TFunction): Promise<RouteK8sResource> => {
|
|
42
26
|
let allRoutes: RouteK8sResource[] = [];
|
|
43
27
|
try {
|
|
44
28
|
allRoutes = await k8sListItems({ model: RouteModel, queryParams: {} });
|
|
45
29
|
} catch (e) {
|
|
46
|
-
|
|
47
|
-
setError({
|
|
48
|
-
title: t('ai:Failed to save configuration'),
|
|
49
|
-
message: t('ai:Can not query routes.'),
|
|
50
|
-
});
|
|
51
|
-
return undefined;
|
|
30
|
+
throw new Error(`${t('ai:Failed to save configuration')}: ${getErrorMessage(e)}`);
|
|
52
31
|
}
|
|
53
32
|
|
|
54
33
|
const assistedImageServiceRoute = allRoutes?.find(
|
|
@@ -56,54 +35,41 @@ const getAssistedImageServiceRoute = async (
|
|
|
56
35
|
);
|
|
57
36
|
|
|
58
37
|
if (!assistedImageServiceRoute?.spec?.host) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
38
|
+
throw new Error(
|
|
39
|
+
`${t('ai:Failed to save configuration')}: ${t(
|
|
40
|
+
'ai:Can not find host of the assisted-image-service route',
|
|
41
|
+
)}`,
|
|
42
|
+
);
|
|
64
43
|
}
|
|
65
44
|
|
|
66
45
|
return assistedImageServiceRoute;
|
|
67
46
|
};
|
|
68
47
|
|
|
69
|
-
|
|
70
|
-
const getClusterDomain = (
|
|
71
|
-
t: TFunction,
|
|
72
|
-
setError: SetErrorFuncType,
|
|
73
|
-
assistedImageServiceRoute: RouteK8sResource,
|
|
74
|
-
): string | undefined => {
|
|
48
|
+
const getClusterDomain = (t: TFunction, assistedImageServiceRoute: RouteK8sResource) => {
|
|
75
49
|
const prefix = `${ASSISTED_IMAGE_SERVICE_ROUTE_PREFIX}.`;
|
|
76
50
|
const host: string = assistedImageServiceRoute.spec?.host || '';
|
|
77
51
|
const appsDomain = host.substring(host.indexOf(prefix) + prefix.length);
|
|
78
52
|
|
|
79
|
-
// the appsDomain can be prefixed either by "apps." or "nlb-apps." so search for first dot
|
|
80
53
|
const domain = appsDomain.substring(appsDomain.indexOf('.') + 1);
|
|
81
54
|
|
|
82
55
|
if (!domain) {
|
|
83
|
-
|
|
84
|
-
// console.error('Can not find domain in assistedImageServiceRoute: ', assistedImageServiceRoute);
|
|
85
|
-
setError({
|
|
86
|
-
title: t('ai:Can not find cluster domain.'),
|
|
87
|
-
});
|
|
56
|
+
throw new Error(t('ai:Can not find cluster domain.'));
|
|
88
57
|
}
|
|
89
58
|
|
|
90
59
|
return domain;
|
|
91
60
|
};
|
|
92
61
|
|
|
93
|
-
// Keep this function in sync with getClusterDomain()
|
|
94
62
|
const patchAssistedImageServiceRoute = async (
|
|
95
63
|
t: TFunction,
|
|
96
|
-
setError: SetErrorFuncType,
|
|
97
|
-
|
|
98
64
|
assistedImageServiceRoute: RouteK8sResource,
|
|
99
65
|
domain: string,
|
|
100
|
-
)
|
|
66
|
+
) => {
|
|
101
67
|
const newHost = `${ASSISTED_IMAGE_SERVICE_ROUTE_PREFIX}.nlb-apps.${domain}`;
|
|
102
68
|
|
|
103
69
|
const labels = assistedImageServiceRoute.metadata?.labels || {};
|
|
104
70
|
labels['router-type'] = 'nlb';
|
|
105
71
|
|
|
106
|
-
const patches = [
|
|
72
|
+
const patches: Patch[] = [
|
|
107
73
|
{
|
|
108
74
|
op: 'replace',
|
|
109
75
|
path: '/spec/host',
|
|
@@ -123,38 +89,28 @@ const patchAssistedImageServiceRoute = async (
|
|
|
123
89
|
data: patches,
|
|
124
90
|
});
|
|
125
91
|
} catch (e) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
92
|
+
throw new Error(
|
|
93
|
+
`${t('ai:Failed to patch assisted-image-service route for new domain.')}: ${getErrorMessage(
|
|
94
|
+
e,
|
|
95
|
+
)}`,
|
|
96
|
+
);
|
|
131
97
|
}
|
|
132
|
-
|
|
133
|
-
return true;
|
|
134
98
|
};
|
|
135
99
|
|
|
136
|
-
export
|
|
100
|
+
export async function isIngressController() {
|
|
137
101
|
try {
|
|
138
102
|
await k8sGet({
|
|
139
103
|
name: 'ingress-controller-with-nlb',
|
|
140
104
|
ns: 'openshift-ingress-operator',
|
|
141
105
|
model: IngressControllerModel,
|
|
142
106
|
});
|
|
143
|
-
|
|
144
107
|
return true;
|
|
145
108
|
} catch {
|
|
146
109
|
return false;
|
|
147
110
|
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
const createIngressController = async (
|
|
151
|
-
t: TFunction,
|
|
152
|
-
setError: SetErrorFuncType,
|
|
153
|
-
|
|
154
|
-
domain: string,
|
|
155
|
-
): Promise<boolean> => {
|
|
156
|
-
// Assumption: the IngressController resource is not present - ensured at higher level
|
|
111
|
+
}
|
|
157
112
|
|
|
113
|
+
const createIngressController = async (t: TFunction, domain: string) => {
|
|
158
114
|
const ingressController = {
|
|
159
115
|
apiVersion: 'operator.openshift.io/v1',
|
|
160
116
|
kind: 'IngressController',
|
|
@@ -186,71 +142,45 @@ const createIngressController = async (
|
|
|
186
142
|
|
|
187
143
|
try {
|
|
188
144
|
await k8sCreate({ model: IngressControllerModel, data: ingressController });
|
|
189
|
-
return true;
|
|
190
145
|
} catch (e) {
|
|
191
|
-
|
|
192
|
-
setError({
|
|
193
|
-
title: t('ai:Failed to create IngressController'),
|
|
194
|
-
});
|
|
146
|
+
throw new Error(`${t('ai:Failed to create IngressController')}: ${getErrorMessage(e)}`);
|
|
195
147
|
}
|
|
196
|
-
|
|
197
|
-
return false;
|
|
198
148
|
};
|
|
199
149
|
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
})
|
|
207
|
-
try {
|
|
208
|
-
const provisioning = await k8sGet<
|
|
209
|
-
K8sResourceCommon & { spec?: { watchAllNamespaces?: boolean } }
|
|
210
|
-
>({
|
|
211
|
-
model: ProvisioningModel,
|
|
212
|
-
name: 'provisioning-configuration',
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
const patches = [
|
|
216
|
-
{
|
|
217
|
-
op: provisioning.spec?.watchAllNamespaces ? 'replace' : 'add',
|
|
218
|
-
path: '/spec/watchAllNamespaces',
|
|
219
|
-
value: true,
|
|
220
|
-
},
|
|
221
|
-
];
|
|
150
|
+
export const patchProvisioning = async () => {
|
|
151
|
+
const provisioning = await k8sGet<
|
|
152
|
+
K8sResourceCommon & { spec?: { watchAllNamespaces?: boolean } }
|
|
153
|
+
>({
|
|
154
|
+
model: ProvisioningModel,
|
|
155
|
+
name: 'provisioning-configuration',
|
|
156
|
+
});
|
|
222
157
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
resource: provisioning,
|
|
226
|
-
data: patches,
|
|
227
|
-
});
|
|
228
|
-
} catch (e) {
|
|
229
|
-
// console.error('Failed to patch provisioning-configuration: ', e);
|
|
230
|
-
setError({
|
|
231
|
-
title: t('ai:Failed to configure provisioning to enable registering hosts via BMC.'),
|
|
232
|
-
message: getErrorMessage(e),
|
|
233
|
-
variant: AlertVariant.warning,
|
|
234
|
-
});
|
|
158
|
+
if (provisioning.spec?.watchAllNamespaces) {
|
|
159
|
+
return;
|
|
235
160
|
}
|
|
161
|
+
|
|
162
|
+
const patches = [
|
|
163
|
+
{
|
|
164
|
+
op: provisioning.spec?.watchAllNamespaces === false ? 'replace' : 'add',
|
|
165
|
+
path: '/spec/watchAllNamespaces',
|
|
166
|
+
value: true,
|
|
167
|
+
},
|
|
168
|
+
];
|
|
169
|
+
|
|
170
|
+
await k8sPatch({
|
|
171
|
+
model: ProvisioningModel,
|
|
172
|
+
resource: provisioning,
|
|
173
|
+
data: patches,
|
|
174
|
+
});
|
|
236
175
|
};
|
|
237
176
|
|
|
238
|
-
const createAgentServiceConfig = async ({
|
|
177
|
+
export const createAgentServiceConfig = async ({
|
|
239
178
|
t,
|
|
240
|
-
|
|
241
|
-
dbVolSizeGiB,
|
|
242
|
-
fsVolSizeGiB,
|
|
243
|
-
imgVolSizeGiB,
|
|
244
|
-
ciscoIntersightURL,
|
|
179
|
+
values,
|
|
245
180
|
}: {
|
|
246
181
|
t: TFunction;
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
dbVolSizeGiB: number;
|
|
250
|
-
fsVolSizeGiB: number;
|
|
251
|
-
imgVolSizeGiB: number;
|
|
252
|
-
ciscoIntersightURL?: string;
|
|
253
|
-
}): Promise<boolean> => {
|
|
182
|
+
values: CimConfigurationValues;
|
|
183
|
+
}) => {
|
|
254
184
|
try {
|
|
255
185
|
const agentServiceConfig = {
|
|
256
186
|
apiVersion: 'agent-install.openshift.io/v1beta1',
|
|
@@ -264,7 +194,7 @@ const createAgentServiceConfig = async ({
|
|
|
264
194
|
accessModes: ['ReadWriteOnce'],
|
|
265
195
|
resources: {
|
|
266
196
|
requests: {
|
|
267
|
-
storage: `${
|
|
197
|
+
storage: `${values.dbVolSize}Gi`,
|
|
268
198
|
},
|
|
269
199
|
},
|
|
270
200
|
},
|
|
@@ -272,7 +202,7 @@ const createAgentServiceConfig = async ({
|
|
|
272
202
|
accessModes: ['ReadWriteOnce'],
|
|
273
203
|
resources: {
|
|
274
204
|
requests: {
|
|
275
|
-
storage: `${
|
|
205
|
+
storage: `${values.fsVolSize}Gi`,
|
|
276
206
|
},
|
|
277
207
|
},
|
|
278
208
|
},
|
|
@@ -280,17 +210,17 @@ const createAgentServiceConfig = async ({
|
|
|
280
210
|
accessModes: ['ReadWriteOnce'],
|
|
281
211
|
resources: {
|
|
282
212
|
requests: {
|
|
283
|
-
storage: `${
|
|
213
|
+
storage: `${values.imgVolSize}Gi`,
|
|
284
214
|
},
|
|
285
215
|
},
|
|
286
216
|
},
|
|
287
217
|
},
|
|
288
218
|
};
|
|
289
219
|
|
|
290
|
-
if (ciscoIntersightURL) {
|
|
220
|
+
if (values.ciscoIntersightURL) {
|
|
291
221
|
agentServiceConfig.metadata = {
|
|
292
222
|
...agentServiceConfig.metadata,
|
|
293
|
-
annotations: { ciscoIntersightURL },
|
|
223
|
+
annotations: { ciscoIntersightURL: values.ciscoIntersightURL },
|
|
294
224
|
};
|
|
295
225
|
}
|
|
296
226
|
|
|
@@ -298,99 +228,67 @@ const createAgentServiceConfig = async ({
|
|
|
298
228
|
model: AgentServiceConfigModel,
|
|
299
229
|
data: agentServiceConfig,
|
|
300
230
|
});
|
|
301
|
-
|
|
302
|
-
return true;
|
|
303
231
|
} catch (e) {
|
|
304
|
-
|
|
305
|
-
title: t('ai:Failed to create AgentServiceConfig'),
|
|
306
|
-
message: getErrorMessage(e),
|
|
307
|
-
});
|
|
308
|
-
return false;
|
|
232
|
+
throw new Error(`${t('ai:Failed to create AgentServiceConfig')}: ${getErrorMessage(e)}`);
|
|
309
233
|
}
|
|
310
234
|
};
|
|
311
235
|
|
|
312
|
-
|
|
313
|
-
export const onEnableCIM = async ({
|
|
236
|
+
export const editAgentServiceConfig = async ({
|
|
314
237
|
t,
|
|
315
|
-
setError,
|
|
316
|
-
|
|
317
238
|
agentServiceConfig,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
dbVolSizeGiB,
|
|
321
|
-
fsVolSizeGiB,
|
|
322
|
-
imgVolSizeGiB,
|
|
323
|
-
|
|
324
|
-
configureLoadBalancer,
|
|
325
|
-
ciscoIntersightURL,
|
|
239
|
+
values,
|
|
326
240
|
}: {
|
|
327
241
|
t: TFunction;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
agentServiceConfig?: AgentServiceConfigK8sResource;
|
|
331
|
-
platform: string;
|
|
332
|
-
|
|
333
|
-
dbVolSizeGiB: number;
|
|
334
|
-
fsVolSizeGiB: number;
|
|
335
|
-
imgVolSizeGiB: number;
|
|
336
|
-
|
|
337
|
-
configureLoadBalancer: boolean;
|
|
338
|
-
ciscoIntersightURL?: string;
|
|
242
|
+
agentServiceConfig: AgentServiceConfigK8sResource;
|
|
243
|
+
values: CimConfigurationValues;
|
|
339
244
|
}) => {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
} else {
|
|
358
|
-
const patches = [] as K8sPatch;
|
|
245
|
+
const patches: Patch[] = [];
|
|
246
|
+
|
|
247
|
+
if (
|
|
248
|
+
agentServiceConfig.metadata?.annotations?.['ciscoIntersightURL'] &&
|
|
249
|
+
!values.ciscoIntersightURL
|
|
250
|
+
) {
|
|
251
|
+
patches.push({
|
|
252
|
+
op: 'remove',
|
|
253
|
+
path: '/metadata/annotations/ciscoIntersightURL',
|
|
254
|
+
});
|
|
255
|
+
} else if (!agentServiceConfig.metadata?.annotations && values.ciscoIntersightURL) {
|
|
256
|
+
patches.push({
|
|
257
|
+
op: 'add',
|
|
258
|
+
path: '/metadata/annotations',
|
|
259
|
+
value: { ciscoIntersightURL: values.ciscoIntersightURL },
|
|
260
|
+
});
|
|
261
|
+
} else if (values.ciscoIntersightURL) {
|
|
359
262
|
appendPatch(
|
|
360
263
|
patches,
|
|
361
264
|
'/metadata/annotations/ciscoIntersightURL',
|
|
362
|
-
ciscoIntersightURL,
|
|
265
|
+
values.ciscoIntersightURL,
|
|
363
266
|
agentServiceConfig.metadata?.annotations?.['ciscoIntersightURL'],
|
|
364
267
|
);
|
|
365
|
-
await k8sPatch({ model: AgentServiceConfigModel, resource: agentServiceConfig, data: patches });
|
|
366
268
|
}
|
|
367
269
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
if (configureLoadBalancer) {
|
|
372
|
-
// Recently No to Yes only (since we do not delete the ingress controller)
|
|
373
|
-
if (await isIngressController()) {
|
|
374
|
-
return true /* Not an error */;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
const assistedImageServiceRoute = await getAssistedImageServiceRoute(t, setError);
|
|
378
|
-
if (!assistedImageServiceRoute) {
|
|
379
|
-
return false;
|
|
380
|
-
}
|
|
270
|
+
if (patches.length === 0) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
381
273
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
274
|
+
try {
|
|
275
|
+
await k8sPatch({
|
|
276
|
+
model: AgentServiceConfigModel,
|
|
277
|
+
resource: agentServiceConfig,
|
|
278
|
+
data: patches,
|
|
279
|
+
});
|
|
280
|
+
} catch (e) {
|
|
281
|
+
throw new Error(`${t('ai:Failed to save configuration')}: ${getErrorMessage(e)}`);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
386
284
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
) {
|
|
391
|
-
return false;
|
|
392
|
-
}
|
|
285
|
+
export const configureIngressLoadBalancer = async ({ t }: { t: TFunction }) => {
|
|
286
|
+
if (await isIngressController()) {
|
|
287
|
+
return;
|
|
393
288
|
}
|
|
394
289
|
|
|
395
|
-
|
|
290
|
+
const assistedImageServiceRoute = await getAssistedImageServiceRoute(t);
|
|
291
|
+
const domain = getClusterDomain(t, assistedImageServiceRoute);
|
|
292
|
+
await createIngressController(t, domain);
|
|
293
|
+
await patchAssistedImageServiceRoute(t, assistedImageServiceRoute, domain);
|
|
396
294
|
};
|
package/lib/cim/hooks/index.tsx
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useK8sWatchResource } from './useK8sWatchResource';
|
|
2
|
+
import { AgentK8sResource } from '../types';
|
|
3
|
+
import { K8sWatchHookProps } from './types';
|
|
4
|
+
|
|
5
|
+
export const useAgents = (props: K8sWatchHookProps) =>
|
|
6
|
+
useK8sWatchResource<AgentK8sResource[]>(
|
|
7
|
+
{
|
|
8
|
+
groupVersionKind: {
|
|
9
|
+
group: 'agent-install.openshift.io',
|
|
10
|
+
kind: 'Agent',
|
|
11
|
+
version: 'v1beta1',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
props,
|
|
15
|
+
);
|
|
@@ -56,7 +56,7 @@ export type AgentClusterInstallK8sResource = K8sResourceCommon & {
|
|
|
56
56
|
cidr: string;
|
|
57
57
|
}[];
|
|
58
58
|
userManagedNetworking?: boolean;
|
|
59
|
-
networkType?: 'OpenShiftSDN' | 'OVNKubernetes';
|
|
59
|
+
networkType?: 'OpenShiftSDN' | 'OVNKubernetes' | 'CiscoACI' | 'Cilium' | 'Calico' | 'None';
|
|
60
60
|
};
|
|
61
61
|
holdInstallation?: boolean;
|
|
62
62
|
platformType: string;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
GridItem,
|
|
4
|
-
ClipboardCopy,
|
|
5
|
-
clipboardCopyFunc,
|
|
6
|
-
Button,
|
|
7
|
-
Alert,
|
|
8
|
-
TextInput,
|
|
9
|
-
} from '@patternfly/react-core';
|
|
2
|
+
import { GridItem, ClipboardCopy, clipboardCopyFunc, Alert } from '@patternfly/react-core';
|
|
10
3
|
import { Credentials, Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
11
4
|
import { LoadingState, ErrorState } from '../../components/ui/uiState';
|
|
12
5
|
import { DetailList, DetailItem } from '../../components/ui/DetailList';
|
|
13
6
|
import { TroubleshootingOpenshiftConsoleButton } from './ConsoleModal';
|
|
14
|
-
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
15
7
|
import { useTranslation } from '../../hooks/use-translation-wrapper';
|
|
16
8
|
|
|
17
9
|
type ClusterCredentialsProps = {
|
|
@@ -74,55 +66,59 @@ const ClusterCredentials: React.FC<ClusterCredentialsProps> = ({
|
|
|
74
66
|
const consoleUrl = credentials.consoleUrl
|
|
75
67
|
? getConsoleUrl(credentials.consoleUrl, isMceEnabled)
|
|
76
68
|
: '';
|
|
69
|
+
const hasVips = Boolean(cluster.apiVips?.length && cluster.ingressVips?.length);
|
|
77
70
|
credentialsBody = (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
title={t('ai:Web Console URL')}
|
|
82
|
-
value={
|
|
83
|
-
<>
|
|
84
|
-
<Button
|
|
85
|
-
variant="link"
|
|
86
|
-
icon={<ExternalLinkAltIcon />}
|
|
87
|
-
iconPosition="right"
|
|
88
|
-
isInline
|
|
89
|
-
onClick={() => window.open(consoleUrl, '_blank', 'noopener')}
|
|
90
|
-
data-testid={`${idPrefix}-link-console-url`}
|
|
91
|
-
>
|
|
92
|
-
{consoleUrl}
|
|
93
|
-
</Button>
|
|
94
|
-
<br />
|
|
95
|
-
{!!cluster.apiVips && !!cluster.ingressVips && (
|
|
96
|
-
<TroubleshootingOpenshiftConsoleButton
|
|
97
|
-
consoleUrl={consoleUrl}
|
|
98
|
-
cluster={cluster}
|
|
99
|
-
idPrefix={idPrefix}
|
|
100
|
-
/>
|
|
101
|
-
)}
|
|
102
|
-
</>
|
|
103
|
-
}
|
|
104
|
-
/>
|
|
105
|
-
)}
|
|
106
|
-
{credentials.username && (
|
|
107
|
-
<>
|
|
71
|
+
<>
|
|
72
|
+
<DetailList>
|
|
73
|
+
{credentials.consoleUrl && (
|
|
108
74
|
<DetailItem
|
|
109
|
-
title={t('ai:
|
|
110
|
-
value={<TextInput value={credentials.username} readOnlyVariant="default" />}
|
|
111
|
-
/>
|
|
112
|
-
<DetailItem
|
|
113
|
-
title={t('ai:Password')}
|
|
75
|
+
title={t('ai:Web Console URL')}
|
|
114
76
|
value={
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
77
|
+
<>
|
|
78
|
+
<ClipboardCopy
|
|
79
|
+
isReadOnly
|
|
80
|
+
className="pf-v6-u-my-sm"
|
|
81
|
+
data-testid={`${idPrefix}-link-console-url`}
|
|
82
|
+
>
|
|
83
|
+
{consoleUrl}
|
|
84
|
+
</ClipboardCopy>
|
|
85
|
+
{hasVips && (
|
|
86
|
+
<TroubleshootingOpenshiftConsoleButton
|
|
87
|
+
consoleUrl={consoleUrl}
|
|
88
|
+
cluster={cluster}
|
|
89
|
+
idPrefix={idPrefix}
|
|
90
|
+
/>
|
|
91
|
+
)}
|
|
92
|
+
</>
|
|
121
93
|
}
|
|
122
94
|
/>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
95
|
+
)}
|
|
96
|
+
{credentials.username && (
|
|
97
|
+
<>
|
|
98
|
+
<DetailItem
|
|
99
|
+
title={t('ai:Username')}
|
|
100
|
+
value={
|
|
101
|
+
<ClipboardCopy isReadOnly className="pf-v6-u-my-sm">
|
|
102
|
+
{credentials.username}
|
|
103
|
+
</ClipboardCopy>
|
|
104
|
+
}
|
|
105
|
+
/>
|
|
106
|
+
<DetailItem
|
|
107
|
+
title={t('ai:Password')}
|
|
108
|
+
value={
|
|
109
|
+
<ClipboardCopy
|
|
110
|
+
isReadOnly
|
|
111
|
+
className="pf-v6-u-my-sm"
|
|
112
|
+
onCopy={(event) => clipboardCopyFunc(event, credentials.password)}
|
|
113
|
+
>
|
|
114
|
+
•••••
|
|
115
|
+
</ClipboardCopy>
|
|
116
|
+
}
|
|
117
|
+
/>
|
|
118
|
+
</>
|
|
119
|
+
)}
|
|
120
|
+
</DetailList>
|
|
121
|
+
</>
|
|
126
122
|
);
|
|
127
123
|
}
|
|
128
124
|
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
} from '@patternfly/react-core';
|
|
13
13
|
import { InfoCircleIcon } from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
14
14
|
import { removeProtocolFromURL } from '../../api';
|
|
15
|
-
import { ToolbarButton } from '../ui/Toolbar';
|
|
16
15
|
import PrismCode from '../ui/PrismCode';
|
|
17
16
|
import { useTranslation } from '../../hooks/use-translation-wrapper';
|
|
18
17
|
import { selectApiVip, selectIngressVip } from '../../selectors';
|
|
@@ -24,11 +23,6 @@ type WebConsoleHintProps = {
|
|
|
24
23
|
idPrefix?: string;
|
|
25
24
|
};
|
|
26
25
|
|
|
27
|
-
type LaunchOpenshiftConsoleButtonProps = WebConsoleHintProps & {
|
|
28
|
-
isDisabled: boolean;
|
|
29
|
-
id?: string;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
26
|
type ConsoleModalProps = WebConsoleHintProps & {
|
|
33
27
|
closeModal: () => void;
|
|
34
28
|
isOpen: boolean;
|
|
@@ -103,35 +97,6 @@ export const WebConsoleHint: React.FC<WebConsoleHintProps> = ({ cluster, console
|
|
|
103
97
|
);
|
|
104
98
|
};
|
|
105
99
|
|
|
106
|
-
export const LaunchOpenshiftConsoleButton: React.FC<LaunchOpenshiftConsoleButtonProps> = ({
|
|
107
|
-
cluster,
|
|
108
|
-
consoleUrl,
|
|
109
|
-
isDisabled,
|
|
110
|
-
id,
|
|
111
|
-
}) => {
|
|
112
|
-
const [isOpen, setOpen] = React.useState(false);
|
|
113
|
-
const { t } = useTranslation();
|
|
114
|
-
return (
|
|
115
|
-
<>
|
|
116
|
-
<ToolbarButton
|
|
117
|
-
type="button"
|
|
118
|
-
variant={ButtonVariant.primary}
|
|
119
|
-
isDisabled={isDisabled}
|
|
120
|
-
onClick={() => setOpen(true)}
|
|
121
|
-
data-testid={id}
|
|
122
|
-
>
|
|
123
|
-
{t('ai:Launch OpenShift Console')}
|
|
124
|
-
</ToolbarButton>
|
|
125
|
-
<ConsoleModal
|
|
126
|
-
closeModal={() => setOpen(false)}
|
|
127
|
-
consoleUrl={consoleUrl}
|
|
128
|
-
cluster={cluster}
|
|
129
|
-
isOpen={isOpen}
|
|
130
|
-
/>
|
|
131
|
-
</>
|
|
132
|
-
);
|
|
133
|
-
};
|
|
134
|
-
|
|
135
100
|
export const TroubleshootingOpenshiftConsoleButton: React.FC<WebConsoleHintProps> = ({
|
|
136
101
|
cluster,
|
|
137
102
|
consoleUrl,
|