@openshift-assisted/ui-lib 2.14.0-cim → 2.14.2-cim
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts +2 -3
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts +3 -0
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts +15 -2
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.d.ts +1 -2
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts +1 -2
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.d.ts +8 -7
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.d.ts +17 -0
- package/build/@types/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.d.ts +8 -0
- package/build/@types/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/components/ValidationSection.d.ts +16 -0
- package/build/@types/cim/components/ClusterDeployment/components/ValidationSection.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/constants.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/constants.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/index.d.ts +1 -2
- package/build/@types/cim/components/ClusterDeployment/index.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts +1 -11
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/types.d.ts +7 -9
- package/build/@types/cim/components/ClusterDeployment/types.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts +8 -2
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts.map +1 -1
- package/build/@types/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.d.ts.map +1 -1
- package/build/@types/cim/components/Hypershift/types.d.ts +6 -3
- package/build/@types/cim/components/Hypershift/types.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvAgentTable.d.ts.map +1 -1
- package/build/@types/cim/components/common/constants.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/agents.d.ts +3 -0
- package/build/@types/cim/components/helpers/agents.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/toAssisted.d.ts.map +1 -1
- package/build/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/EditAgentModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts +3 -0
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts +1 -0
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +7 -0
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -0
- package/build/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
- package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
- package/build/@types/common/components/hosts/EditHostForm.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -0
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js +9 -7
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +26 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +13 -29
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js +2 -12
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js +50 -26
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js +3 -3
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js +39 -21
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js +58 -27
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.js +24 -24
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js +26 -42
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.js +12 -8
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +4 -5
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js +5 -5
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.js +50 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.js +24 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ValidationSection.js +17 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ValidationSection.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/constants.js +2 -0
- package/build/cjs/cim/components/ClusterDeployment/constants.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/index.js +2 -5
- package/build/cjs/cim/components/ClusterDeployment/index.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js +1 -14
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.js +6 -4
- package/build/cjs/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -12
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js +1 -1
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js.map +1 -1
- package/build/cjs/cim/components/common/constants.js +1 -1
- package/build/cjs/cim/components/common/constants.js.map +1 -1
- package/build/cjs/cim/components/helpers/agents.js +19 -1
- package/build/cjs/cim/components/helpers/agents.js.map +1 -1
- package/build/cjs/cim/components/helpers/toAssisted.js +25 -22
- package/build/cjs/cim/components/helpers/toAssisted.js.map +1 -1
- package/build/cjs/cim/components/modals/AddHostModal.js +4 -5
- package/build/cjs/cim/components/modals/AddHostModal.js.map +1 -1
- package/build/cjs/cim/components/modals/EditAgentModal.js +2 -2
- package/build/cjs/cim/components/modals/EditAgentModal.js.map +1 -1
- package/build/cjs/cim/components/modals/ScaleUpModal.js +3 -2
- package/build/cjs/cim/components/modals/ScaleUpModal.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +41 -0
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -0
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +4 -5
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js +5 -5
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +1 -0
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js +14 -18
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js +4 -4
- package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js.map +1 -1
- package/build/cjs/common/components/hosts/EditHostForm.js +3 -3
- package/build/cjs/common/components/hosts/EditHostForm.js.map +1 -1
- package/build/cjs/common/components/ui/formik/validationSchemas.js +18 -15
- package/build/cjs/common/components/ui/formik/validationSchemas.js.map +1 -1
- package/build/cjs/common/config/constants.js +1 -1
- package/build/cjs/common/config/constants.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.tsx +11 -9
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +63 -3
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +25 -53
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.tsx +7 -16
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.tsx +102 -59
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx +16 -10
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.tsx +84 -48
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.tsx +106 -54
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.tsx +96 -85
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizard.tsx +109 -119
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.tsx +27 -14
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +4 -6
- package/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx +5 -5
- package/lib/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.tsx +107 -0
- package/lib/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.tsx +49 -0
- package/lib/cim/components/ClusterDeployment/components/ValidationSection.tsx +41 -0
- package/lib/cim/components/ClusterDeployment/constants.ts +3 -1
- package/lib/cim/components/ClusterDeployment/index.ts +1 -3
- package/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts +1 -26
- package/lib/cim/components/ClusterDeployment/types.ts +7 -10
- package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +3 -3
- package/lib/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.tsx +4 -2
- package/lib/cim/components/Hypershift/types.ts +6 -3
- package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +7 -16
- package/lib/cim/components/InfraEnv/OpenshiftVersionDropdown.tsx +1 -1
- package/lib/cim/components/common/constants.ts +1 -2
- package/lib/cim/components/helpers/agents.ts +30 -1
- package/lib/cim/components/helpers/toAssisted.ts +13 -8
- package/lib/cim/components/modals/AddHostModal.tsx +4 -5
- package/lib/cim/components/modals/EditAgentModal.tsx +2 -1
- package/lib/cim/components/modals/ScaleUpModal.tsx +12 -2
- package/lib/cim/types/k8s/infra-env-k8s-resource.ts +1 -0
- package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +93 -0
- package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +10 -12
- package/lib/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.tsx +9 -9
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -0
- package/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx +50 -61
- package/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx +4 -4
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/hosts/EditHostForm.tsx +16 -6
- package/lib/common/components/ui/formik/validationSchemas.ts +13 -10
- package/lib/common/config/constants.ts +1 -1
- package/package.json +4 -3
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.d.ts +0 -10
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.d.ts +0 -13
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.d.ts +0 -4
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.d.ts +0 -7
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.d.ts.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.js +0 -31
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.js +0 -50
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.js +0 -35
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.js +0 -9
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.js.map +0 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.tsx +0 -79
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.tsx +0 -128
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.tsx +0 -81
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.tsx +0 -13
|
@@ -17,14 +17,13 @@ import { BMCFormProps } from '../Agent/types';
|
|
|
17
17
|
import { AgentMachineK8sResource } from '../Hypershift/types';
|
|
18
18
|
import { AddHostDropdownProps, ProvisioningConfigResult } from '../InfraEnv/types';
|
|
19
19
|
import { AddHostModalProps, EditBMHModalProps, UploadActionModalProps } from '../modals/types';
|
|
20
|
+
import { Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
20
21
|
|
|
21
22
|
export type EditAgentModalProps = {
|
|
22
|
-
agent: AgentK8sResource
|
|
23
|
-
isOpen: boolean;
|
|
23
|
+
agent: AgentK8sResource;
|
|
24
24
|
usedHostnames: string[] | undefined;
|
|
25
25
|
onClose: () => void;
|
|
26
|
-
|
|
27
|
-
onSave: (agent: AgentK8sResource, hostname: string) => Promise<any>;
|
|
26
|
+
onSave: (host: Host, hostname: string) => Promise<unknown>;
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
export type AgentTableActions = {
|
|
@@ -85,7 +84,6 @@ export type ScaleUpFormValues = Omit<
|
|
|
85
84
|
|
|
86
85
|
export type ClusterDeploymentDetailsStepProps = ClusterDeploymentDetailsProps & {
|
|
87
86
|
onSaveDetails: (values: ClusterDeploymentDetailsValues) => Promise<unknown>;
|
|
88
|
-
onClose: () => void;
|
|
89
87
|
isPreviewOpen: boolean;
|
|
90
88
|
isNutanix: boolean;
|
|
91
89
|
};
|
|
@@ -98,7 +96,6 @@ export type ClusterDeploymentDetailsNetworkingProps = Pick<
|
|
|
98
96
|
agentClusterInstall: AgentClusterInstallK8sResource;
|
|
99
97
|
agents: AgentK8sResource[];
|
|
100
98
|
onSaveNetworking: (values: ClusterDeploymentNetworkingValues) => Promise<string | void>;
|
|
101
|
-
onClose: () => void;
|
|
102
99
|
fetchInfraEnv: (name: string, namespace: string) => Promise<InfraEnvK8sResource>;
|
|
103
100
|
isPreviewOpen: boolean;
|
|
104
101
|
isNutanix: boolean;
|
|
@@ -115,7 +112,6 @@ export type ClusterDeploymentHostSelectionStepProps = Omit<
|
|
|
115
112
|
'onHostSelect' | 'onAutoSelectChange'
|
|
116
113
|
> & {
|
|
117
114
|
onSaveHostsSelection: (values: ClusterDeploymentHostsSelectionValues) => Promise<string | void>;
|
|
118
|
-
onClose: () => void;
|
|
119
115
|
};
|
|
120
116
|
|
|
121
117
|
export type ClusterDeploymentHostsDiscoveryStepProps = Omit<
|
|
@@ -123,7 +119,6 @@ export type ClusterDeploymentHostsDiscoveryStepProps = Omit<
|
|
|
123
119
|
'usedHostnames'
|
|
124
120
|
> & {
|
|
125
121
|
onSaveHostsDiscovery: () => Promise<void>;
|
|
126
|
-
onClose: () => void;
|
|
127
122
|
};
|
|
128
123
|
|
|
129
124
|
export type ClusterDeploymentWizardProps = {
|
|
@@ -146,6 +141,7 @@ export type ClusterDeploymentWizardProps = {
|
|
|
146
141
|
clusterDeployment: ClusterDeploymentK8sResource;
|
|
147
142
|
agentClusterInstall: AgentClusterInstallK8sResource;
|
|
148
143
|
agents: AgentK8sResource[];
|
|
144
|
+
bareMetalHosts: BareMetalHostK8sResource[];
|
|
149
145
|
aiConfigMap?: ConfigMapK8sResource;
|
|
150
146
|
infraEnv?: InfraEnvK8sResource;
|
|
151
147
|
infraNMStates: NMStateK8sResource[];
|
|
@@ -155,7 +151,8 @@ export type ClusterDeploymentWizardProps = {
|
|
|
155
151
|
setPreviewOpen: (open: boolean) => void;
|
|
156
152
|
fetchManagedClusters: () => Promise<K8sResourceCommon[]>;
|
|
157
153
|
fetchKlusterletAddonConfig: () => Promise<K8sResourceCommon[]>;
|
|
158
|
-
|
|
154
|
+
onChangeHostname: ClusterDeploymentHostsDiscoveryStepProps['onChangeHostname'];
|
|
155
|
+
onChangeBMHHostname: ClusterDeploymentHostsDiscoveryStepProps['onChangeBMHHostname'];
|
|
159
156
|
onSaveBMH: EditBMHModalProps['onEdit'];
|
|
160
157
|
onSaveISOParams?: AddHostModalProps['onSaveISOParams'];
|
|
161
158
|
onSaveHostsDiscovery: ClusterDeploymentHostsDiscoveryStepProps['onSaveHostsDiscovery'];
|
|
@@ -225,7 +222,7 @@ export type ClusterDeploymentHostsDiscoveryProps = AddHostDropdownProps & {
|
|
|
225
222
|
aiConfigMap?: ConfigMapK8sResource;
|
|
226
223
|
infraNMStates: NMStateK8sResource[];
|
|
227
224
|
|
|
228
|
-
|
|
225
|
+
onChangeHostname: InfraEnvAgentTableProps['onChangeHostname'];
|
|
229
226
|
onEditRole: ClusterDeploymentHostDiscoveryTableProps['onEditRole'];
|
|
230
227
|
onSetInstallationDiskId: AgentTableActions['onSetInstallationDiskId'];
|
|
231
228
|
onSaveBMH: EditBMHModalProps['onEdit'];
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
HostSubnets,
|
|
18
18
|
hostPrefixValidationSchema,
|
|
19
19
|
ipBlockValidationSchema,
|
|
20
|
-
|
|
20
|
+
vipArrayValidationSchema,
|
|
21
21
|
sshPublicKeyValidationSchema,
|
|
22
22
|
hostSubnetValidationSchema,
|
|
23
23
|
httpProxyValidationSchema,
|
|
@@ -50,8 +50,8 @@ const getNetworkConfigurationValidationSchema = (
|
|
|
50
50
|
clusterNetworkHostPrefix: hostPrefixValidationSchema(values.clusterNetworkCidr),
|
|
51
51
|
clusterNetworkCidr: ipBlockValidationSchema(values.serviceNetworkCidr),
|
|
52
52
|
serviceNetworkCidr: ipBlockValidationSchema(values.clusterNetworkCidr),
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
apiVips: vipArrayValidationSchema(hostSubnets, values, initialValues.apiVips),
|
|
54
|
+
ingressVips: vipArrayValidationSchema(hostSubnets, values, initialValues.ingressVips),
|
|
55
55
|
sshPublicKey: sshPublicKeyValidationSchema,
|
|
56
56
|
hostSubnet: hostSubnetValidationSchema,
|
|
57
57
|
httpProxy: httpProxyValidationSchema({ values, pairValueName: 'httpsProxy' }),
|
|
@@ -15,8 +15,10 @@ const HypershiftKubeconfigDownload = ({
|
|
|
15
15
|
fetchSecret,
|
|
16
16
|
}: HypershiftKubeconfigDownloadProps) => {
|
|
17
17
|
const { t } = useTranslation();
|
|
18
|
+
const kubeconfigSecretName = hostedCluster.status?.customkubeconfig
|
|
19
|
+
? hostedCluster.status.customkubeconfig?.name
|
|
20
|
+
: hostedCluster.status?.kubeconfig?.name;
|
|
18
21
|
const handleKubeconfigDownload = async () => {
|
|
19
|
-
const kubeconfigSecretName = hostedCluster.status?.kubeconfig?.name;
|
|
20
22
|
const kubeconfigSecretNamespace = hostedCluster.metadata?.namespace;
|
|
21
23
|
|
|
22
24
|
if (kubeconfigSecretName && kubeconfigSecretNamespace) {
|
|
@@ -41,7 +43,7 @@ const HypershiftKubeconfigDownload = ({
|
|
|
41
43
|
variant={ButtonVariant.secondary}
|
|
42
44
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
43
45
|
onClick={handleKubeconfigDownload}
|
|
44
|
-
isDisabled={!
|
|
46
|
+
isDisabled={!kubeconfigSecretName}
|
|
45
47
|
>
|
|
46
48
|
{t('ai:Download kubeconfig')}
|
|
47
49
|
</Button>
|
|
@@ -133,11 +133,11 @@ export type HostedClusterK8sResource = K8sResourceCommon & {
|
|
|
133
133
|
endpointAccess: 'Public';
|
|
134
134
|
kubeCloudControllerCreds: { name?: string };
|
|
135
135
|
nodePoolManagementCreds: { name?: string };
|
|
136
|
-
region:
|
|
136
|
+
region: string;
|
|
137
137
|
resourceTags: [
|
|
138
138
|
{
|
|
139
|
-
key:
|
|
140
|
-
value:
|
|
139
|
+
key: string;
|
|
140
|
+
value: string;
|
|
141
141
|
},
|
|
142
142
|
];
|
|
143
143
|
};
|
|
@@ -157,6 +157,9 @@ export type HostedClusterK8sResource = K8sResourceCommon & {
|
|
|
157
157
|
kubeconfig?: {
|
|
158
158
|
name: string;
|
|
159
159
|
};
|
|
160
|
+
customkubeconfig?: {
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
160
163
|
kubeadminPassword?: {
|
|
161
164
|
name: string;
|
|
162
165
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Button, Stack, StackItem } from '@patternfly/react-core';
|
|
3
3
|
import { DropdownItem } from '@patternfly/react-core/deprecated';
|
|
4
|
-
import noop from 'lodash-es/noop.js';
|
|
5
4
|
|
|
6
5
|
import { Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
7
6
|
import {
|
|
@@ -33,12 +32,12 @@ import {
|
|
|
33
32
|
} from '../../../common';
|
|
34
33
|
import { InfraEnvAgentTableProps } from '../ClusterDeployment/types';
|
|
35
34
|
import { MassApproveAgentModal, MassDeleteAgentModal } from '../modals';
|
|
36
|
-
import { MassChangeHostnameModalProps } from '../../../common/components/hosts/MassChangeHostnameModal';
|
|
37
35
|
import MassApproveAction from '../modals/MassApproveAction';
|
|
38
36
|
import { usePagination } from '../../../common/components/hosts/usePagination';
|
|
39
37
|
import InfraTableToolbar from './InfraTableToolbar';
|
|
40
38
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
41
39
|
import { agentStatus, bmhStatus } from '../helpers/agentStatus';
|
|
40
|
+
import { onAgentChangeHostname } from '../helpers';
|
|
42
41
|
|
|
43
42
|
type NoFilterMatchStateProps = {
|
|
44
43
|
onClearFilters: VoidFunction;
|
|
@@ -205,19 +204,6 @@ const InfraEnvAgentTable: React.FC<InfraEnvAgentTableProps> = ({
|
|
|
205
204
|
<DeleteHostAction key="delete" onDeleteHost={() => setMassDeleteOpen(!isMassDeleteOpen)} />,
|
|
206
205
|
];
|
|
207
206
|
|
|
208
|
-
const onAgentChangeHostname: MassChangeHostnameModalProps['onChangeHostname'] = async (
|
|
209
|
-
host,
|
|
210
|
-
hostname,
|
|
211
|
-
) => {
|
|
212
|
-
const agent = agents.find((a) => a.metadata?.uid === host.id);
|
|
213
|
-
if (agent) {
|
|
214
|
-
return onChangeHostname(agent, hostname);
|
|
215
|
-
} else {
|
|
216
|
-
const bmh = bareMetalHosts.find((bmh) => bmh.metadata?.uid === host.id);
|
|
217
|
-
return bmh ? onChangeBMHHostname(bmh, hostname) : noop;
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
|
|
221
207
|
const paginationProps = usePagination(hosts.length);
|
|
222
208
|
|
|
223
209
|
return (
|
|
@@ -272,7 +258,12 @@ const InfraEnvAgentTable: React.FC<InfraEnvAgentTableProps> = ({
|
|
|
272
258
|
isOpen={isMassChangeHostOpen}
|
|
273
259
|
hosts={hosts}
|
|
274
260
|
selectedHostIDs={selectedHostIDs}
|
|
275
|
-
onChangeHostname={onAgentChangeHostname
|
|
261
|
+
onChangeHostname={onAgentChangeHostname(
|
|
262
|
+
agents,
|
|
263
|
+
bareMetalHosts,
|
|
264
|
+
onChangeHostname,
|
|
265
|
+
onChangeBMHHostname,
|
|
266
|
+
)}
|
|
276
267
|
onClose={() => setMassChangeHostOpen(false)}
|
|
277
268
|
canChangeHostname={canChangeHostname(agents, agentStatuses, bareMetalHosts, t)}
|
|
278
269
|
/>
|
|
@@ -35,7 +35,7 @@ const OpenshiftVersionDropdown = ({ osImages }: { osImages: OsImage[] }) => {
|
|
|
35
35
|
<Tooltip
|
|
36
36
|
content={t(
|
|
37
37
|
'ai:No OpenShift images available for selected CPU architecture {{cpuArchitecture}}.',
|
|
38
|
-
architectureData[cpuArchitecture as SupportedCpuArchitecture].label,
|
|
38
|
+
{ cpuArchitecture: architectureData[cpuArchitecture as SupportedCpuArchitecture].label },
|
|
39
39
|
)}
|
|
40
40
|
hidden={!!filteredImages.length}
|
|
41
41
|
>
|
|
@@ -16,8 +16,7 @@ export const INFRAENV_GENERATED_AI_FLOW = 'agentBareMetal-generated-infraenv-ai-
|
|
|
16
16
|
export const CPU_ARCHITECTURE_ANNOTATION_KEY = 'agentBareMetal-cpuArchitecture';
|
|
17
17
|
|
|
18
18
|
export const getInfraEnvDocs = (docVersion: string) =>
|
|
19
|
-
`https://
|
|
20
|
-
|
|
19
|
+
`https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/${docVersion}/html-single/clusters/index#enable-cim-prerequisites`;
|
|
21
20
|
export const BMH_HOSTNAME_ANNOTATION = 'bmac.agent-install.openshift.io/hostname';
|
|
22
21
|
|
|
23
22
|
export const OCP_VERSION_MAJOR_MINOR = 'hive.openshift.io/version-major-minor';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgentStatus, getAgentStatusKey } from './status';
|
|
2
2
|
import { Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
3
3
|
import { AgentK8sResource, BareMetalHostK8sResource } from '../../types';
|
|
4
|
-
import { INFRAENV_AGENTINSTALL_LABEL_KEY } from '../common/constants';
|
|
4
|
+
import { AGENT_BMH_NAME_LABEL_KEY, INFRAENV_AGENTINSTALL_LABEL_KEY } from '../common/constants';
|
|
5
5
|
|
|
6
6
|
const AGENT_FOR_SELECTION_STATUSES: AgentStatus[] = [
|
|
7
7
|
'known',
|
|
@@ -33,3 +33,32 @@ export const getInfraEnvNameOfAgent = (resource?: AgentK8sResource | BareMetalHo
|
|
|
33
33
|
|
|
34
34
|
export const getClusterNameOfAgent = (agent?: AgentK8sResource) =>
|
|
35
35
|
agent?.spec?.clusterDeploymentName?.name;
|
|
36
|
+
|
|
37
|
+
type OnAgentChangeHostname<A = AgentK8sResource, B = BareMetalHostK8sResource> = (
|
|
38
|
+
agents: A[],
|
|
39
|
+
bmhs: B[],
|
|
40
|
+
onChangeHostname: (agent: A, hostname: string) => Promise<unknown>,
|
|
41
|
+
onChangeBMHHostname: (bmh: B, hostname: string) => Promise<unknown>,
|
|
42
|
+
) => (host: Host, hostname: string) => Promise<unknown>;
|
|
43
|
+
|
|
44
|
+
export const onAgentChangeHostname: OnAgentChangeHostname<
|
|
45
|
+
AgentK8sResource,
|
|
46
|
+
BareMetalHostK8sResource
|
|
47
|
+
> = (agents, bmhs, onChangeHostname, onChangeBMHHostname) => (host, hostname) => {
|
|
48
|
+
const agent = agents.find((a) => a.metadata?.uid === host.id);
|
|
49
|
+
let bmh: BareMetalHostK8sResource | undefined;
|
|
50
|
+
if (agent) {
|
|
51
|
+
const bmhName = agent.metadata?.labels?.[AGENT_BMH_NAME_LABEL_KEY];
|
|
52
|
+
if (!bmhName) {
|
|
53
|
+
return onChangeHostname(agent, hostname);
|
|
54
|
+
}
|
|
55
|
+
// If Agent is backed by BMH, we need to update hostname on BMH
|
|
56
|
+
bmh = bmhs.find(
|
|
57
|
+
(bmh) =>
|
|
58
|
+
bmh.metadata?.namespace === agent.metadata?.namespace && bmh.metadata?.name === bmhName,
|
|
59
|
+
);
|
|
60
|
+
} else {
|
|
61
|
+
bmh = bmhs.find((bmh) => bmh.metadata?.uid === host.id);
|
|
62
|
+
}
|
|
63
|
+
return bmh ? onChangeBMHHostname(bmh, hostname) : Promise.resolve(undefined);
|
|
64
|
+
};
|
|
@@ -135,14 +135,18 @@ export const getAICluster = ({
|
|
|
135
135
|
name: clusterDeployment.spec?.clusterName,
|
|
136
136
|
baseDnsDomain: clusterDeployment.spec?.baseDomain,
|
|
137
137
|
openshiftVersion: installVersion,
|
|
138
|
-
apiVips:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
apiVips:
|
|
139
|
+
agentClusterInstall?.status?.apiVIP || agentClusterInstall?.spec?.apiVIP
|
|
140
|
+
? [
|
|
141
|
+
{
|
|
142
|
+
ip: agentClusterInstall?.status?.apiVIP || agentClusterInstall?.spec?.apiVIP,
|
|
143
|
+
},
|
|
144
|
+
]
|
|
145
|
+
: [],
|
|
146
|
+
ingressVips:
|
|
147
|
+
agentClusterInstall?.status?.ingressVIP || agentClusterInstall?.spec?.ingressVIP
|
|
148
|
+
? [{ ip: agentClusterInstall?.status?.ingressVIP || agentClusterInstall?.spec?.ingressVIP }]
|
|
149
|
+
: [],
|
|
146
150
|
highAvailabilityMode:
|
|
147
151
|
agentClusterInstall?.spec?.provisionRequirements?.controlPlaneAgents === 1 ? 'None' : 'Full',
|
|
148
152
|
status,
|
|
@@ -170,6 +174,7 @@ export const getAICluster = ({
|
|
|
170
174
|
validationsInfo: JSON.stringify(agentClusterInstall?.status?.validationsInfo || {}),
|
|
171
175
|
cpuArchitecture: getClusterDeploymentCpuArchitecture(clusterDeployment, infraEnv),
|
|
172
176
|
networkType: agentClusterInstall?.spec?.networking.networkType,
|
|
177
|
+
controlPlaneCount: agentClusterInstall?.spec?.provisionRequirements.controlPlaneAgents || 3,
|
|
173
178
|
};
|
|
174
179
|
/*
|
|
175
180
|
aiCluster.agentSelectorMasterLabels =
|
|
@@ -30,9 +30,8 @@ const AddHostModal: React.FC<AddHostModalProps> = ({
|
|
|
30
30
|
const hasDHCP = infraEnv.metadata?.labels?.networkType !== 'static';
|
|
31
31
|
const sshPublicKey = infraEnv.spec?.sshAuthorizedKey || agentClusterInstall?.spec?.sshPublicKey;
|
|
32
32
|
const { httpProxy, httpsProxy, noProxy } = infraEnv.spec?.proxy || {};
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const [dialogType, setDialogType] = React.useState<AddHostModalStepType>(isoDialog);
|
|
33
|
+
const imageType = infraEnv.spec?.imageType || 'minimal-iso';
|
|
34
|
+
const [dialogType, setDialogType] = React.useState<AddHostModalStepType>('config');
|
|
36
35
|
const { t } = useTranslation();
|
|
37
36
|
const handleIsoConfigSubmit = async (
|
|
38
37
|
values: DiscoveryImageFormValues,
|
|
@@ -66,8 +65,8 @@ const AddHostModal: React.FC<AddHostModalProps> = ({
|
|
|
66
65
|
<DiscoveryImageConfigForm
|
|
67
66
|
onCancel={onClose}
|
|
68
67
|
handleSubmit={handleIsoConfigSubmit}
|
|
69
|
-
hideDiscoveryImageType={
|
|
70
|
-
imageType=
|
|
68
|
+
hideDiscoveryImageType={isIPXE}
|
|
69
|
+
imageType={imageType}
|
|
71
70
|
sshPublicKey={sshPublicKey}
|
|
72
71
|
httpProxy={httpProxy}
|
|
73
72
|
httpsProxy={httpsProxy}
|
|
@@ -7,11 +7,12 @@ const EditAgentModal: React.FC<EditAgentModalProps> = ({ agent, onSave, ...rest
|
|
|
7
7
|
const [host] = agent ? getAIHosts([agent]) : [];
|
|
8
8
|
return (
|
|
9
9
|
<EditHostModal
|
|
10
|
+
isOpen
|
|
10
11
|
host={host}
|
|
11
12
|
inventory={agent?.status?.inventory}
|
|
12
13
|
{...rest}
|
|
13
14
|
onSave={async ({ hostname }) => {
|
|
14
|
-
agent && (await onSave(
|
|
15
|
+
agent && (await onSave(host, hostname));
|
|
15
16
|
rest.onClose();
|
|
16
17
|
}}
|
|
17
18
|
/>
|
|
@@ -25,6 +25,8 @@ import EditAgentModal from './EditAgentModal';
|
|
|
25
25
|
import { getAgentsHostsNames } from '../ClusterDeployment/helpers';
|
|
26
26
|
import { getErrorMessage } from '../../../common/utils';
|
|
27
27
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
28
|
+
import { onAgentChangeHostname } from '../helpers';
|
|
29
|
+
import { BareMetalHostK8sResource } from '../../types';
|
|
28
30
|
|
|
29
31
|
const getAgentsToAdd = (
|
|
30
32
|
selectedHostIds: ScaleUpFormValues['selectedHostIds'] | ScaleUpFormValues['autoSelectedHostIds'],
|
|
@@ -56,7 +58,9 @@ type ScaleUpModalProps = {
|
|
|
56
58
|
addHostsToCluster: (agentsToAdd: AgentK8sResource[]) => Promise<void>;
|
|
57
59
|
clusterDeployment: ClusterDeploymentK8sResource;
|
|
58
60
|
agents: AgentK8sResource[];
|
|
61
|
+
bareMetalHosts: BareMetalHostK8sResource[];
|
|
59
62
|
onChangeHostname: (agent: AgentK8sResource, hostname: string) => Promise<AgentK8sResource>;
|
|
63
|
+
onChangeBMHHostname: (bmh: BareMetalHostK8sResource, hostname: string) => Promise<unknown>;
|
|
60
64
|
onSetInstallationDiskId: AgentTableActions['onSetInstallationDiskId'];
|
|
61
65
|
isNutanix: boolean;
|
|
62
66
|
};
|
|
@@ -67,7 +71,9 @@ const ScaleUpModal: React.FC<ScaleUpModalProps> = ({
|
|
|
67
71
|
addHostsToCluster,
|
|
68
72
|
clusterDeployment,
|
|
69
73
|
agents,
|
|
74
|
+
bareMetalHosts,
|
|
70
75
|
onChangeHostname,
|
|
76
|
+
onChangeBMHHostname,
|
|
71
77
|
onSetInstallationDiskId,
|
|
72
78
|
isNutanix,
|
|
73
79
|
}) => {
|
|
@@ -176,9 +182,13 @@ const ScaleUpModal: React.FC<ScaleUpModalProps> = ({
|
|
|
176
182
|
{editAgent && (
|
|
177
183
|
<EditAgentModal
|
|
178
184
|
agent={editAgent}
|
|
179
|
-
isOpen
|
|
180
185
|
onClose={() => setEditAgent(undefined)}
|
|
181
|
-
onSave={
|
|
186
|
+
onSave={onAgentChangeHostname(
|
|
187
|
+
agents,
|
|
188
|
+
bareMetalHosts,
|
|
189
|
+
onChangeHostname,
|
|
190
|
+
onChangeBMHHostname,
|
|
191
|
+
)}
|
|
182
192
|
usedHostnames={getAgentsHostsNames(clusterAgents)}
|
|
183
193
|
/>
|
|
184
194
|
)}
|
|
@@ -25,6 +25,7 @@ export type InfraEnvK8sResource = K8sResourceCommon & {
|
|
|
25
25
|
additionalNTPSources?: string[];
|
|
26
26
|
cpuArchitecture?: 'x86_64' | 'arm64' | 's390x';
|
|
27
27
|
osImageVersion?: string;
|
|
28
|
+
imageType?: 'full-iso' | 'minimal-iso';
|
|
28
29
|
};
|
|
29
30
|
status?: {
|
|
30
31
|
agentLabelSelector?: Selector;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dropdown, DropdownItem, DropdownToggle } from '@patternfly/react-core/deprecated';
|
|
3
|
+
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
|
4
|
+
import { useTranslation } from '../../hooks/use-translation-wrapper';
|
|
5
|
+
import { getFieldId, StaticField } from '../..';
|
|
6
|
+
import { useField } from 'formik';
|
|
7
|
+
import toNumber from 'lodash-es/toNumber';
|
|
8
|
+
|
|
9
|
+
interface ControlPlaneNodesOption {
|
|
10
|
+
value: number;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const isDropdownItemEnabled = (controlPlaneNodeCount: number, isNutanix?: boolean): boolean => {
|
|
15
|
+
return (controlPlaneNodeCount === 1 && !isNutanix) || controlPlaneNodeCount !== 1;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const ControlPlaneNodesDropdown = ({
|
|
19
|
+
isDisabled = false,
|
|
20
|
+
isNutanix,
|
|
21
|
+
}: {
|
|
22
|
+
isDisabled?: boolean;
|
|
23
|
+
isNutanix?: boolean;
|
|
24
|
+
}) => {
|
|
25
|
+
const { t } = useTranslation();
|
|
26
|
+
const [{ name, value: selectedValue }, , { setValue }] = useField<number | 3>(
|
|
27
|
+
'controlPlaneCount',
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const options: ControlPlaneNodesOption[] = [
|
|
31
|
+
{ value: 1, label: t('ai:1 (Single Node OpenShift - not highly available cluster)') },
|
|
32
|
+
{ value: 3, label: t('ai:3 (highly available cluster)') },
|
|
33
|
+
{ value: 4, label: t('ai:4 (highly available cluster+)') },
|
|
34
|
+
{ value: 5, label: t('ai:5 (highly available cluster++)') },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const dropdownItems = options.map(({ value, label }) => {
|
|
38
|
+
const isItemEnabled = isDropdownItemEnabled(value, isNutanix);
|
|
39
|
+
const disabledReason = t('ai:This option is not available for Nutanix platform');
|
|
40
|
+
return (
|
|
41
|
+
<DropdownItem
|
|
42
|
+
key={value}
|
|
43
|
+
id={value.toString()}
|
|
44
|
+
isAriaDisabled={!isItemEnabled}
|
|
45
|
+
selected={selectedValue === value}
|
|
46
|
+
value={value}
|
|
47
|
+
>
|
|
48
|
+
<Tooltip hidden={isItemEnabled} content={disabledReason} position="top">
|
|
49
|
+
<div>{label}</div>
|
|
50
|
+
</Tooltip>
|
|
51
|
+
</DropdownItem>
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const [controlPlanelOpen, setControlPlanelOpen] = React.useState(false);
|
|
56
|
+
const fieldId = getFieldId(name, 'input');
|
|
57
|
+
|
|
58
|
+
const onControlPlaneSelect = (e?: React.SyntheticEvent<HTMLDivElement>) => {
|
|
59
|
+
const val = e?.currentTarget.id as string;
|
|
60
|
+
setValue(toNumber(val));
|
|
61
|
+
setControlPlanelOpen(false);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return !isDisabled ? (
|
|
65
|
+
<FormGroup isInline fieldId={fieldId} label={t('ai:Number of control plane nodes')} isRequired>
|
|
66
|
+
<Dropdown
|
|
67
|
+
toggle={
|
|
68
|
+
<DropdownToggle
|
|
69
|
+
onToggle={() => setControlPlanelOpen(!controlPlanelOpen)}
|
|
70
|
+
className="pf-u-w-100"
|
|
71
|
+
>
|
|
72
|
+
{selectedValue ? selectedValue : '3'}
|
|
73
|
+
</DropdownToggle>
|
|
74
|
+
}
|
|
75
|
+
name="controlPlaneCount"
|
|
76
|
+
isOpen={controlPlanelOpen}
|
|
77
|
+
onSelect={onControlPlaneSelect}
|
|
78
|
+
dropdownItems={dropdownItems}
|
|
79
|
+
className="pf-u-w-100"
|
|
80
|
+
/>
|
|
81
|
+
</FormGroup>
|
|
82
|
+
) : (
|
|
83
|
+
<StaticField
|
|
84
|
+
name={'controlPlaneCount'}
|
|
85
|
+
label={t('ai:Number of control plane nodes')}
|
|
86
|
+
isRequired
|
|
87
|
+
>
|
|
88
|
+
{selectedValue}
|
|
89
|
+
</StaticField>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export default ControlPlaneNodesDropdown;
|
|
@@ -116,17 +116,6 @@ export const DiscoveryImageConfigForm: React.FC<DiscoveryImageConfigFormProps> =
|
|
|
116
116
|
<>
|
|
117
117
|
<ModalBoxBody>
|
|
118
118
|
<Stack hasGutter>
|
|
119
|
-
<StackItem>
|
|
120
|
-
<Alert
|
|
121
|
-
variant={AlertVariant.info}
|
|
122
|
-
isInline
|
|
123
|
-
title={
|
|
124
|
-
isIPXE
|
|
125
|
-
? t('ai:To add hosts to the cluster, generate iPXE script.')
|
|
126
|
-
: t('ai:To add hosts to the cluster, generate a Discovery ISO.')
|
|
127
|
-
}
|
|
128
|
-
/>
|
|
129
|
-
</StackItem>
|
|
130
119
|
{hasDHCP === false && (
|
|
131
120
|
<StackItem>
|
|
132
121
|
<StaticIPInfo docVersion={docVersion} />
|
|
@@ -134,8 +123,17 @@ export const DiscoveryImageConfigForm: React.FC<DiscoveryImageConfigFormProps> =
|
|
|
134
123
|
)}
|
|
135
124
|
<StackItem>
|
|
136
125
|
<Form>
|
|
137
|
-
<AlertFormikError status={status as StatusErrorType} />
|
|
138
126
|
{!hideDiscoveryImageType && <DiscoveryImageTypeControlGroup />}
|
|
127
|
+
<AlertFormikError status={status as StatusErrorType} />
|
|
128
|
+
<Alert
|
|
129
|
+
variant={AlertVariant.info}
|
|
130
|
+
isInline
|
|
131
|
+
title={
|
|
132
|
+
isIPXE
|
|
133
|
+
? t('ai:To add hosts to the cluster, generate iPXE script.')
|
|
134
|
+
: t('ai:To add hosts to the cluster, generate a Discovery ISO.')
|
|
135
|
+
}
|
|
136
|
+
/>
|
|
139
137
|
<UploadSSH />
|
|
140
138
|
<ProxyFields />
|
|
141
139
|
</Form>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Flex, FlexItem } from '@patternfly/react-core';
|
|
3
3
|
import { PopoverIcon, RadioField } from '../ui';
|
|
4
4
|
import { useTranslation } from '../../hooks/use-translation-wrapper';
|
|
5
5
|
|
|
@@ -20,38 +20,38 @@ const DiscoveryImageTypeControlGroupLabel = ({
|
|
|
20
20
|
const DiscoveryImageTypeControlGroup = () => {
|
|
21
21
|
const { t } = useTranslation();
|
|
22
22
|
return (
|
|
23
|
-
<
|
|
24
|
-
<
|
|
23
|
+
<Flex>
|
|
24
|
+
<FlexItem spacer={{ default: 'spacer3xl' }}>
|
|
25
25
|
<RadioField
|
|
26
26
|
name={GROUP_NAME}
|
|
27
27
|
id={'minimal-iso'}
|
|
28
28
|
value={'minimal-iso'}
|
|
29
29
|
label={
|
|
30
30
|
<DiscoveryImageTypeControlGroupLabel
|
|
31
|
-
text={t('ai:Minimal image file
|
|
31
|
+
text={t('ai:Minimal image file')}
|
|
32
32
|
popoverContent={t(
|
|
33
33
|
"ai:Recommended option. The generated discovery ISO will be smaller, but will need to download additional data during boot. This option is useful if ISO storage capacity is limited or if it's being served over a constrained network.",
|
|
34
34
|
)}
|
|
35
35
|
/>
|
|
36
36
|
}
|
|
37
37
|
/>
|
|
38
|
-
</
|
|
39
|
-
<
|
|
38
|
+
</FlexItem>
|
|
39
|
+
<FlexItem>
|
|
40
40
|
<RadioField
|
|
41
41
|
name={GROUP_NAME}
|
|
42
42
|
id={'full-iso'}
|
|
43
43
|
value={'full-iso'}
|
|
44
44
|
label={
|
|
45
45
|
<DiscoveryImageTypeControlGroupLabel
|
|
46
|
-
text={t('ai:Full image file
|
|
46
|
+
text={t('ai:Full image file')}
|
|
47
47
|
popoverContent={t(
|
|
48
48
|
'ai:The generated discovery ISO will contain everything needed to boot.',
|
|
49
49
|
)}
|
|
50
50
|
/>
|
|
51
51
|
}
|
|
52
52
|
/>
|
|
53
|
-
</
|
|
54
|
-
</
|
|
53
|
+
</FlexItem>
|
|
54
|
+
</Flex>
|
|
55
55
|
);
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -81,6 +81,7 @@ export const getClusterDetailsInitialValues = ({
|
|
|
81
81
|
platform: cluster?.platform?.type || 'none',
|
|
82
82
|
customOpenshiftSelect: null,
|
|
83
83
|
userManagedNetworking: cluster?.userManagedNetworking || false,
|
|
84
|
+
controlPlaneCount: cluster?.controlPlaneCount || 3,
|
|
84
85
|
};
|
|
85
86
|
};
|
|
86
87
|
|