@openshift-assisted/ui-lib 2.9.6-cim → 2.9.7-cim

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts +1 -0
  2. package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
  3. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts +1 -0
  4. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
  5. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts +2 -1
  6. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
  7. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.d.ts.map +1 -1
  8. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.d.ts.map +1 -1
  9. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.d.ts +1 -0
  10. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.d.ts.map +1 -1
  11. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts.map +1 -1
  12. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts.map +1 -1
  13. package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts +1 -0
  14. package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
  15. package/build/@types/cim/components/ClusterDeployment/types.d.ts +4 -0
  16. package/build/@types/cim/components/ClusterDeployment/types.d.ts.map +1 -1
  17. package/build/@types/cim/components/helpers/versions.d.ts +1 -1
  18. package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
  19. package/build/@types/common/api/assisted-service/ClustersAPI.d.ts +1 -3
  20. package/build/@types/common/api/assisted-service/ClustersAPI.d.ts.map +1 -1
  21. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.d.ts.map +1 -1
  22. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.d.ts.map +1 -1
  23. package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts +0 -1
  24. package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts.map +1 -1
  25. package/build/@types/ocm/components/clusterConfiguration/platformIntegration/constants.d.ts +0 -3
  26. package/build/@types/ocm/components/clusterConfiguration/platformIntegration/constants.d.ts.map +1 -1
  27. package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
  28. package/build/@types/ocm/hooks/index.d.ts +0 -1
  29. package/build/@types/ocm/hooks/index.d.ts.map +1 -1
  30. package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js +3 -2
  31. package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +1 -1
  32. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +3 -3
  33. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
  34. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +5 -4
  35. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
  36. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js +2 -2
  37. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js.map +1 -1
  38. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.js +14 -9
  39. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.js.map +1 -1
  40. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.js +2 -2
  41. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.js.map +1 -1
  42. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js +2 -2
  43. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js.map +1 -1
  44. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js +4 -4
  45. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js.map +1 -1
  46. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +4 -3
  47. package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
  48. package/build/cjs/cim/components/Hypershift/hooks/useSupportedOCPVersions.js +1 -1
  49. package/build/cjs/cim/components/Hypershift/hooks/useSupportedOCPVersions.js.map +1 -1
  50. package/build/cjs/cim/components/helpers/versions.js +9 -2
  51. package/build/cjs/cim/components/helpers/versions.js.map +1 -1
  52. package/build/cjs/common/api/assisted-service/ClustersAPI.js +0 -6
  53. package/build/cjs/common/api/assisted-service/ClustersAPI.js.map +1 -1
  54. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js +7 -11
  55. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js.map +1 -1
  56. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +1 -2
  57. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
  58. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js +2 -3
  59. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js.map +1 -1
  60. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/constants.js +2 -5
  61. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/constants.js.map +1 -1
  62. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +6 -5
  63. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
  64. package/build/cjs/ocm/hooks/index.js +1 -3
  65. package/build/cjs/ocm/hooks/index.js.map +1 -1
  66. package/lib/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.tsx +8 -1
  67. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +7 -1
  68. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +6 -1
  69. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.tsx +2 -0
  70. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.tsx +14 -12
  71. package/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.tsx +3 -1
  72. package/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.tsx +3 -0
  73. package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizard.tsx +4 -0
  74. package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +8 -2
  75. package/lib/cim/components/ClusterDeployment/types.ts +4 -0
  76. package/lib/cim/components/Hypershift/hooks/useSupportedOCPVersions.ts +1 -1
  77. package/lib/cim/components/helpers/versions.ts +8 -1
  78. package/lib/common/api/assisted-service/ClustersAPI.ts +0 -9
  79. package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx +5 -18
  80. package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +3 -4
  81. package/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx +3 -15
  82. package/lib/ocm/components/clusterConfiguration/platformIntegration/constants.tsx +1 -5
  83. package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +11 -6
  84. package/lib/ocm/hooks/index.ts +0 -1
  85. package/package.json +3 -4
  86. package/build/@types/ocm/hooks/useClusterSupportedPlatforms.d.ts +0 -11
  87. package/build/@types/ocm/hooks/useClusterSupportedPlatforms.d.ts.map +0 -1
  88. package/build/cjs/ocm/hooks/useClusterSupportedPlatforms.js +0 -53
  89. package/build/cjs/ocm/hooks/useClusterSupportedPlatforms.js.map +0 -1
  90. package/lib/ocm/hooks/useClusterSupportedPlatforms.ts +0 -70
@@ -12,12 +12,14 @@ type DetailsFormBodyProps = {
12
12
  clusterImages: ClusterImageSetK8sResource[];
13
13
  onValuesChanged: (values: ClusterDetailsValues, initRender: boolean) => void;
14
14
  extensionAfter: ClusterDetailsFormFieldsProps['extensionAfter'];
15
+ isNutanix?: boolean;
15
16
  };
16
17
 
17
18
  const DetailsFormBody: React.FC<DetailsFormBodyProps> = ({
18
19
  onValuesChanged,
19
20
  clusterImages,
20
21
  extensionAfter,
22
+ isNutanix,
21
23
  }) => {
22
24
  const { values } = useFormikContext<ClusterDetailsValues>();
23
25
  const initRenderRef = React.useRef(true);
@@ -27,7 +29,11 @@ const DetailsFormBody: React.FC<DetailsFormBodyProps> = ({
27
29
  }, []);
28
30
 
29
31
  return (
30
- <ClusterDeploymentDetailsForm clusterImages={clusterImages} extensionAfter={extensionAfter} />
32
+ <ClusterDeploymentDetailsForm
33
+ clusterImages={clusterImages}
34
+ extensionAfter={extensionAfter}
35
+ isNutanix={isNutanix}
36
+ />
31
37
  );
32
38
  };
33
39
 
@@ -45,6 +51,7 @@ const ACMClusterDeploymentDetailsStep: React.FC<ACMClusterDeploymentDetailsStepP
45
51
  const [initialValues, validationSchema] = useDetailsFormik({
46
52
  clusterImages,
47
53
  usedClusterNames,
54
+ isNutanix: !!rest.isNutanix,
48
55
  });
49
56
  return (
50
57
  <Formik
@@ -14,6 +14,7 @@ type ClusterDeploymentDetailsFormProps = {
14
14
  clusterDeployment?: ClusterDeploymentK8sResource;
15
15
  agentClusterInstall?: AgentClusterInstallK8sResource;
16
16
  extensionAfter?: ClusterDetailsFormFieldsProps['extensionAfter'];
17
+ isNutanix?: boolean;
17
18
  };
18
19
 
19
20
  const ClusterDeploymentDetailsForm: React.FC<ClusterDeploymentDetailsFormProps> = ({
@@ -21,8 +22,12 @@ const ClusterDeploymentDetailsForm: React.FC<ClusterDeploymentDetailsFormProps>
21
22
  clusterDeployment,
22
23
  clusterImages,
23
24
  extensionAfter,
25
+ isNutanix,
24
26
  }) => {
25
- const ocpVersions = React.useMemo(() => getOCPVersions(clusterImages), [clusterImages]);
27
+ const ocpVersions = React.useMemo(
28
+ () => getOCPVersions(clusterImages, isNutanix),
29
+ [clusterImages, isNutanix],
30
+ );
26
31
  const forceOpenshiftVersion = agentClusterInstall
27
32
  ? getSelectedVersion(clusterImages, agentClusterInstall)
28
33
  : undefined;
@@ -45,6 +50,7 @@ const ClusterDeploymentDetailsForm: React.FC<ClusterDeploymentDetailsFormProps>
45
50
  isEditFlow={isEditFlow}
46
51
  forceOpenshiftVersion={forceOpenshiftVersion}
47
52
  extensionAfter={extensionAfter}
53
+ isNutanix={isNutanix}
48
54
  />
49
55
  </StackItem>
50
56
  </Stack>
@@ -36,6 +36,7 @@ type UseDetailsFormikArgs = {
36
36
  agentClusterInstall?: AgentClusterInstallK8sResource;
37
37
  agents?: AgentK8sResource[];
38
38
  infraEnv?: InfraEnvK8sResource;
39
+ isNutanix: boolean;
39
40
  };
40
41
 
41
42
  export const useDetailsFormik = ({
@@ -45,10 +46,11 @@ export const useDetailsFormik = ({
45
46
  clusterImages,
46
47
  usedClusterNames,
47
48
  infraEnv,
49
+ isNutanix,
48
50
  }: UseDetailsFormikArgs): [ClusterDetailsValues, Lazy] => {
49
51
  const { t } = useTranslation();
50
52
  const featureSupportLevels = useFeatureSupportLevel();
51
- const ocpVersions = getOCPVersions(clusterImages);
53
+ const ocpVersions = getOCPVersions(clusterImages, isNutanix);
52
54
  const cluster = React.useMemo(
53
55
  () =>
54
56
  clusterDeployment && agentClusterInstall
@@ -98,6 +100,7 @@ const ClusterDeploymentDetailsStep: React.FC<ClusterDeploymentDetailsStepProps>
98
100
  onClose,
99
101
  isPreviewOpen,
100
102
  infraEnv,
103
+ isNutanix,
101
104
  }) => {
102
105
  const { addAlert } = useAlerts();
103
106
  const { setCurrentStepId } = React.useContext(ClusterDeploymentWizardContext);
@@ -109,6 +112,7 @@ const ClusterDeploymentDetailsStep: React.FC<ClusterDeploymentDetailsStepProps>
109
112
  clusterImages,
110
113
  usedClusterNames,
111
114
  infraEnv,
115
+ isNutanix,
112
116
  });
113
117
  const next = () =>
114
118
  isCIMFlow(clusterDeployment)
@@ -165,6 +169,7 @@ const ClusterDeploymentDetailsStep: React.FC<ClusterDeploymentDetailsStepProps>
165
169
  agentClusterInstall={agentClusterInstall}
166
170
  clusterDeployment={clusterDeployment}
167
171
  clusterImages={clusterImages}
172
+ isNutanix={isNutanix}
168
173
  />
169
174
  </GridItem>
170
175
  </Grid>
@@ -140,6 +140,7 @@ const HostSelectionForm: React.FC<HostSelectionFormProps> = ({
140
140
  aiConfigMap,
141
141
  onEditRole: onEditRoleInit,
142
142
  onSetInstallationDiskId,
143
+ isNutanix,
143
144
  }) => {
144
145
  const { setCurrentStepId } = React.useContext(ClusterDeploymentWizardContext);
145
146
  const [showClusterErrors, setShowClusterErrors] = React.useState(false);
@@ -279,6 +280,7 @@ const HostSelectionForm: React.FC<HostSelectionFormProps> = ({
279
280
  onSetInstallationDiskId={onSetInstallationDiskId}
280
281
  onAutoSelectChange={onAutoSelectChange}
281
282
  onHostSelect={onHostSelect}
283
+ isNutanix={isNutanix}
282
284
  />
283
285
  </GridItem>
284
286
  </Grid>
@@ -26,6 +26,7 @@ const ClusterDeploymentHostsSelection: React.FC<ClusterDeploymentHostsSelectionP
26
26
  onAutoSelectChange,
27
27
  onHostSelect,
28
28
  onSetInstallationDiskId,
29
+ isNutanix,
29
30
  }) => {
30
31
  const { values } = useFormikContext<ClusterDeploymentHostsSelectionValues>();
31
32
  const { autoSelectHosts } = values;
@@ -35,18 +36,19 @@ const ClusterDeploymentHostsSelection: React.FC<ClusterDeploymentHostsSelectionP
35
36
  const cdNamespace = clusterDeployment?.metadata?.namespace;
36
37
  const cpuArchitecture = getClusterDeploymentCpuArchitecture(clusterDeployment);
37
38
 
38
- const availableAgents = React.useMemo(
39
- () =>
40
- getAgentsForSelection(agents).filter(
41
- (agent) =>
42
- (agent.spec.clusterDeploymentName?.name === cdName &&
43
- agent.spec.clusterDeploymentName?.namespace === cdNamespace) ||
44
- (!agent.spec.clusterDeploymentName?.name &&
45
- !agent.spec.clusterDeploymentName?.namespace &&
46
- agent.status?.inventory.cpu?.architecture === cpuArchitecture),
47
- ),
48
- [agents, cdNamespace, cdName, cpuArchitecture],
49
- );
39
+ const availableAgents = React.useMemo(() => {
40
+ const filtered = getAgentsForSelection(agents).filter(
41
+ (agent) =>
42
+ (agent.spec.clusterDeploymentName?.name === cdName &&
43
+ agent.spec.clusterDeploymentName?.namespace === cdNamespace) ||
44
+ (!agent.spec.clusterDeploymentName?.name &&
45
+ !agent.spec.clusterDeploymentName?.namespace &&
46
+ agent.status?.inventory.cpu?.architecture === cpuArchitecture),
47
+ );
48
+ return isNutanix
49
+ ? filtered.filter((a) => a.status?.inventory?.systemVendor?.manufacturer === 'Nutanix')
50
+ : filtered;
51
+ }, [agents, cdNamespace, cdName, cpuArchitecture, isNutanix]);
50
52
  const { t } = useTranslation();
51
53
  return (
52
54
  <Grid hasGutter>
@@ -53,6 +53,7 @@ type ClusterDeploymentNetworkingFormProps = {
53
53
  onEditHost: AgentTableActions['onEditHost'];
54
54
  onEditRole: AgentTableActions['onEditRole'];
55
55
  onSetInstallationDiskId: AgentTableActions['onSetInstallationDiskId'];
56
+ isNutanix: boolean;
56
57
  };
57
58
 
58
59
  const ClusterDeploymentNetworkingForm: React.FC<ClusterDeploymentNetworkingFormProps> = ({
@@ -68,6 +69,7 @@ const ClusterDeploymentNetworkingForm: React.FC<ClusterDeploymentNetworkingFormP
68
69
  onEditHost,
69
70
  onEditRole,
70
71
  onSetInstallationDiskId,
72
+ isNutanix,
71
73
  }) => {
72
74
  const { values, touched, setFieldValue, setFieldTouched } =
73
75
  useFormikContext<ClusterDeploymentNetworkingValues>();
@@ -139,7 +141,7 @@ const ClusterDeploymentNetworkingForm: React.FC<ClusterDeploymentNetworkingFormP
139
141
  hostSubnets={hostSubnets}
140
142
  isVipDhcpAllocationDisabled
141
143
  defaultNetworkSettings={defaultNetworkSettings}
142
- hideManagedNetworking={getIsSNOCluster(agentClusterInstall)}
144
+ hideManagedNetworking={getIsSNOCluster(agentClusterInstall) || isNutanix}
143
145
  />
144
146
  </GridItem>
145
147
  </Grid>
@@ -35,6 +35,7 @@ type NetworkingFormProps = {
35
35
  onEditRole: AgentTableActions['onEditRole'];
36
36
  onSetInstallationDiskId: AgentTableActions['onSetInstallationDiskId'];
37
37
  isPreviewOpen: ClusterDeploymentDetailsNetworkingProps['isPreviewOpen'];
38
+ isNutanix: ClusterDeploymentDetailsNetworkingProps['isNutanix'];
38
39
  };
39
40
 
40
41
  const NetworkingForm: React.FC<NetworkingFormProps> = ({
@@ -47,6 +48,7 @@ const NetworkingForm: React.FC<NetworkingFormProps> = ({
47
48
  onEditRole,
48
49
  isPreviewOpen,
49
50
  onSetInstallationDiskId,
51
+ isNutanix,
50
52
  }) => {
51
53
  const [showFormErrors, setShowFormErrors] = React.useState(false);
52
54
  const [showClusterErrors, setShowClusterErrors] = React.useState(false);
@@ -149,6 +151,7 @@ const NetworkingForm: React.FC<NetworkingFormProps> = ({
149
151
  onEditRole={onEditRole}
150
152
  isPreviewOpen={isPreviewOpen}
151
153
  onSetInstallationDiskId={onSetInstallationDiskId}
154
+ isNutanix={isNutanix}
152
155
  />
153
156
  </GridItem>
154
157
  </Grid>
@@ -36,6 +36,7 @@ const ClusterDeploymentWizard: React.FC<ClusterDeploymentWizardProps> = ({
36
36
  fetchKlusterletAddonConfig,
37
37
  onSaveISOParams,
38
38
  onCreateBMH,
39
+ isNutanix,
39
40
  ...rest
40
41
  }) => {
41
42
  const [currentStepId, setCurrentStepId] = React.useState<ClusterDeploymentWizardStepsType>(
@@ -70,6 +71,7 @@ const ClusterDeploymentWizard: React.FC<ClusterDeploymentWizardProps> = ({
70
71
  aiConfigMap={aiConfigMap}
71
72
  onEditRole={hostActions.onEditRole}
72
73
  onSetInstallationDiskId={hostActions.onSetInstallationDiskId}
74
+ isNutanix={isNutanix}
73
75
  />
74
76
  );
75
77
  }
@@ -115,6 +117,7 @@ const ClusterDeploymentWizard: React.FC<ClusterDeploymentWizardProps> = ({
115
117
  fetchInfraEnv={fetchInfraEnv}
116
118
  isPreviewOpen={isPreviewOpen}
117
119
  onSetInstallationDiskId={hostActions.onSetInstallationDiskId}
120
+ isNutanix={isNutanix}
118
121
  />
119
122
  );
120
123
  case 'review':
@@ -142,6 +145,7 @@ const ClusterDeploymentWizard: React.FC<ClusterDeploymentWizardProps> = ({
142
145
  onClose={onClose}
143
146
  isPreviewOpen={isPreviewOpen}
144
147
  infraEnv={infraEnv}
148
+ isNutanix={isNutanix}
145
149
  />
146
150
  );
147
151
  }
@@ -21,6 +21,7 @@ export type ClusterDetailsFormFieldsProps = {
21
21
  forceOpenshiftVersion?: string;
22
22
  extensionAfter?: { [key: string]: React.ReactElement };
23
23
  versions: OpenshiftVersionOptionType[];
24
+ isNutanix?: boolean;
24
25
  };
25
26
 
26
27
  export const BaseDnsHelperText: React.FC<{ name?: string; baseDnsDomain?: string }> = ({
@@ -46,6 +47,7 @@ export const ClusterDetailsFormFields: React.FC<ClusterDetailsFormFieldsProps> =
46
47
  versions,
47
48
  forceOpenshiftVersion,
48
49
  extensionAfter,
50
+ isNutanix,
49
51
  }) => {
50
52
  const { values } = useFormikContext<ClusterDetailsValues>();
51
53
  const { name, baseDnsDomain, highAvailabilityMode } = values;
@@ -99,8 +101,12 @@ export const ClusterDetailsFormFields: React.FC<ClusterDetailsFormFieldsProps> =
99
101
  ) : (
100
102
  <OpenShiftVersionSelect versions={versions} />
101
103
  )}
102
- <SNOControlGroup versions={versions} highAvailabilityMode={highAvailabilityMode} />
103
- <ArmCheckbox versions={versions} />
104
+ {!isNutanix && (
105
+ <>
106
+ <SNOControlGroup versions={versions} highAvailabilityMode={highAvailabilityMode} />
107
+ <ArmCheckbox versions={versions} />
108
+ </>
109
+ )}
104
110
  {extensionAfter?.['openshiftVersion'] && extensionAfter['openshiftVersion']}
105
111
  {!isEditFlow && <PullSecret />}
106
112
  {extensionAfter?.['pullSecret'] && extensionAfter['pullSecret']}
@@ -87,6 +87,7 @@ export type ClusterDeploymentDetailsStepProps = ClusterDeploymentDetailsProps &
87
87
  onSaveDetails: (values: ClusterDeploymentDetailsValues) => Promise<unknown>;
88
88
  onClose: () => void;
89
89
  isPreviewOpen: boolean;
90
+ isNutanix: boolean;
90
91
  };
91
92
 
92
93
  export type ClusterDeploymentDetailsNetworkingProps = Pick<
@@ -100,6 +101,7 @@ export type ClusterDeploymentDetailsNetworkingProps = Pick<
100
101
  onClose: () => void;
101
102
  fetchInfraEnv: (name: string, namespace: string) => Promise<InfraEnvK8sResource>;
102
103
  isPreviewOpen: boolean;
104
+ isNutanix: boolean;
103
105
  };
104
106
 
105
107
  export type AgentSelectorChangeProps = {
@@ -163,6 +165,7 @@ export type ClusterDeploymentWizardProps = {
163
165
  docVersion: string; // ACM version
164
166
  onCreateBmcByYaml: UploadActionModalProps['onCreateBmcByYaml'];
165
167
  provisioningConfigResult: ProvisioningConfigResult;
168
+ isNutanix: boolean;
166
169
  };
167
170
 
168
171
  export type FetchSecret = (name: string, namespace: string) => Promise<SecretK8sResource>;
@@ -176,6 +179,7 @@ export type ClusterDeploymentHostsSelectionProps = {
176
179
  onSetInstallationDiskId: AgentTableActions['onSetInstallationDiskId'];
177
180
  onAutoSelectChange: VoidFunction;
178
181
  onHostSelect: VoidFunction;
182
+ isNutanix: boolean;
179
183
  };
180
184
 
181
185
  export type InfraEnvAgentTableProps = Pick<
@@ -13,7 +13,7 @@ export const useSupportedOCPVersions = (
13
13
  supportedVersionsCM?: ConfigMapK8sResource,
14
14
  ) => {
15
15
  return React.useMemo(() => {
16
- const ocpVersions = getOCPVersions(clusterImages);
16
+ const ocpVersions = getOCPVersions(clusterImages, false);
17
17
  const supportedVersionsString = supportedVersionsCM?.data?.['supported-versions'];
18
18
  if (supportedVersionsString) {
19
19
  try {
@@ -36,9 +36,16 @@ const getSupportLevelFromChannel = (
36
36
 
37
37
  export const getOCPVersions = (
38
38
  clusterImageSets: ClusterImageSetK8sResource[],
39
+ isNutanix?: boolean | undefined,
39
40
  ): OpenshiftVersionOptionType[] => {
40
41
  const versions = clusterImageSets
41
- .filter((clusterImageSet) => clusterImageSet.metadata?.labels?.visible !== 'false')
42
+ .filter((clusterImageSet) => {
43
+ let supportedPlatform = true;
44
+ if (isNutanix && clusterImageSet.spec?.releaseImage) {
45
+ supportedPlatform = clusterImageSet.spec.releaseImage.endsWith('-x86_64');
46
+ }
47
+ return supportedPlatform && clusterImageSet.metadata?.labels?.visible !== 'false';
48
+ })
42
49
  .map((clusterImageSet): OpenshiftVersionOptionType => {
43
50
  const version = getVersionFromReleaseImage(clusterImageSet.spec?.releaseImage);
44
51
  return {
@@ -7,7 +7,6 @@ import {
7
7
  Credentials,
8
8
  Host,
9
9
  ImportClusterParams,
10
- PlatformType,
11
10
  PreflightHardwareRequirements,
12
11
  PresignedUrl,
13
12
  ListManifests,
@@ -62,10 +61,6 @@ const ClustersAPI = {
62
61
  return `${ClustersAPI.makeDownloadsBaseURI(clusterId)}/files-presigned`;
63
62
  },
64
63
 
65
- makeSupportedPlatformsBaseURI(clusterId: Cluster['id']) {
66
- return `${ClustersAPI.makeBaseURI(clusterId)}/supported-platforms`;
67
- },
68
-
69
64
  makeActionsBaseURI(clusterId: string) {
70
65
  return `${ClustersAPI.makeBaseURI(clusterId)}/actions`;
71
66
  },
@@ -126,10 +121,6 @@ const ClustersAPI = {
126
121
  });
127
122
  },
128
123
 
129
- getSupportedPlatforms(clusterId: Cluster['id']) {
130
- return client.get<PlatformType[]>(`${ClustersAPI.makeSupportedPlatformsBaseURI(clusterId)}`);
131
- },
132
-
133
124
  getPreflightRequirements(clusterId: Cluster['id']) {
134
125
  return client.get<PreflightHardwareRequirements>(
135
126
  `${ClustersAPI.makeBaseURI(clusterId)}/preflight-requirements`,
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { useFormikContext } from 'formik';
3
- import { TFunction } from 'i18next';
4
3
  import { useSelector } from 'react-redux';
5
4
  import { Alert, AlertVariant, Grid, Tooltip } from '@patternfly/react-core';
6
5
  import { VirtualIPControlGroup, VirtualIPControlGroupProps } from './VirtualIPControlGroup';
@@ -23,16 +22,13 @@ import {
23
22
  import { StackTypeControlGroup } from './StackTypeControl';
24
23
  import { AvailableSubnetsControl } from './AvailableSubnetsControl';
25
24
  import AdvancedNetworkFields from './AdvancedNetworkFields';
26
- import { useTranslation } from '../../../../common/hooks/use-translation-wrapper';
27
25
  import { selectCurrentClusterPermissionsState } from '../../../store/slices/current-cluster/selectors';
28
26
  import { OcmCheckbox } from '../../ui/OcmFormFields';
29
27
  import { NetworkTypeControlGroup } from '../../../../common/components/clusterWizard/networkingSteps/NetworkTypeControlGroup';
30
- import { useClusterSupportedPlatforms } from '../../../hooks';
31
28
  import {
32
29
  NewFeatureSupportLevelData,
33
30
  useNewFeatureSupportLevel,
34
31
  } from '../../../../common/components/newFeatureSupportLevels';
35
- import { SupportedPlatformIntegrationType } from '../../../hooks/useClusterSupportedPlatforms';
36
32
  import {
37
33
  Cluster,
38
34
  ClusterDefaultConfig,
@@ -78,12 +74,9 @@ const getManagedNetworkingDisabledReason = (
78
74
  }
79
75
  };
80
76
 
81
- const getUserManagedDisabledReason = (
82
- supportedPlatformIntegration: SupportedPlatformIntegrationType,
83
- t: TFunction,
84
- ) => {
85
- if (['nutanix', 'vsphere'].includes(supportedPlatformIntegration)) {
86
- return t('ai:User-Managed Networking is not supported when using Nutanix or vSphere');
77
+ const getUserManagedDisabledReason = (featureSupportLevelData: NewFeatureSupportLevelData) => {
78
+ if (!featureSupportLevelData.isFeatureSupported('USER_MANAGED_NETWORKING')) {
79
+ return featureSupportLevelData.getFeatureDisabledReason('USER_MANAGED_NETWORKING');
87
80
  }
88
81
  };
89
82
 
@@ -96,9 +89,7 @@ const getClusterManagedDisabledReason = (featureSupportLevelData: NewFeatureSupp
96
89
  const getManagedNetworkingState = (
97
90
  isDualStack: boolean,
98
91
  isOracleCloudInfrastructure: boolean,
99
- supportedPlatformIntegration: SupportedPlatformIntegrationType,
100
92
  featureSupportLevelData: NewFeatureSupportLevelData,
101
- t: TFunction,
102
93
  ): {
103
94
  isDisabled: boolean;
104
95
  clusterManagedDisabledReason?: string;
@@ -110,7 +101,7 @@ const getManagedNetworkingState = (
110
101
  featureSupportLevelData,
111
102
  );
112
103
  const cmnReason = getClusterManagedDisabledReason(featureSupportLevelData);
113
- const umnReason = getUserManagedDisabledReason(supportedPlatformIntegration, t);
104
+ const umnReason = getUserManagedDisabledReason(featureSupportLevelData);
114
105
 
115
106
  return {
116
107
  isDisabled: !!(cmnReason || umnReason || networkingReason),
@@ -125,9 +116,7 @@ const NetworkConfiguration = ({
125
116
  isVipDhcpAllocationDisabled,
126
117
  defaultNetworkSettings,
127
118
  }: NetworkConfigurationProps) => {
128
- const { t } = useTranslation();
129
119
  const featureSupportLevelData = useNewFeatureSupportLevel();
130
- const { supportedPlatformIntegration } = useClusterSupportedPlatforms(cluster.id);
131
120
  const { isViewerMode } = useSelector(selectCurrentClusterPermissionsState);
132
121
  const { setFieldValue, values, validateField } = useFormikContext<NetworkConfigurationValues>();
133
122
 
@@ -205,11 +194,9 @@ const NetworkConfiguration = ({
205
194
  getManagedNetworkingState(
206
195
  isDualStack,
207
196
  cluster.platform?.type === 'oci',
208
- supportedPlatformIntegration,
209
197
  featureSupportLevelData,
210
- t,
211
198
  ),
212
- [isDualStack, cluster.platform?.type, supportedPlatformIntegration, featureSupportLevelData, t],
199
+ [isDualStack, cluster.platform?.type, featureSupportLevelData],
213
200
  );
214
201
 
215
202
  return (
@@ -39,7 +39,7 @@ import {
39
39
  updateClusterBase,
40
40
  } from '../../../store/slices/current-cluster/slice';
41
41
  import { isUnknownServerError, getApiErrorMessage, handleApiError } from '../../../api';
42
- import { useClusterSupportedPlatforms, usePullSecret } from '../../../hooks';
42
+ import { usePullSecret } from '../../../hooks';
43
43
  import {
44
44
  Cluster,
45
45
  ClusterDefaultConfig,
@@ -66,13 +66,12 @@ const NetworkConfigurationForm: React.FC<{
66
66
  useFormikContext<NetworkConfigurationValues>();
67
67
  const isAutoSaveRunning = useFormikAutoSave();
68
68
  const errorFields = getFormikErrorFields(errors, touched);
69
- const { supportedPlatformIntegration } = useClusterSupportedPlatforms(cluster.id);
70
69
 
71
70
  // DHCP allocation is currently not supported for Nutanix hosts
72
71
  // https://issues.redhat.com/browse/MGMT-12382
73
72
  const isHostsPlatformTypeNutanix = React.useMemo(
74
- () => supportedPlatformIntegration === 'nutanix',
75
- [supportedPlatformIntegration],
73
+ () => cluster.platform?.type === 'nutanix',
74
+ [cluster.platform],
76
75
  );
77
76
 
78
77
  React.useEffect(() => {
@@ -13,13 +13,7 @@ import {
13
13
  import { CaretDownIcon } from '@patternfly/react-icons';
14
14
  import { useField } from 'formik';
15
15
  import { CpuArchitecture, DeveloperPreview, FeatureId, getFieldId } from '../../../../common';
16
-
17
- import {
18
- ExternalPlaformIds,
19
- ExternalPlatformLabels,
20
- ExternalPlatformLinks,
21
- ExternalPlatformTooltips,
22
- } from './constants';
16
+ import { ExternalPlaformIds, ExternalPlatformLabels, ExternalPlatformLinks } from './constants';
23
17
  import { PlatformType } from '@openshift-assisted/types/assisted-installer-service';
24
18
  import {
25
19
  NewFeatureSupportLevelData,
@@ -41,7 +35,6 @@ type ExternalPlatformDropdownProps = {
41
35
  export type ExternalPlatformInfo = {
42
36
  label: string;
43
37
  href?: string;
44
- tooltip?: string;
45
38
  disabledReason?: string;
46
39
  };
47
40
 
@@ -83,7 +76,6 @@ const getExternalPlatformTypes = (
83
76
  [platform]: {
84
77
  label: ExternalPlatformLabels[platform],
85
78
  href: ExternalPlatformLinks[platform],
86
- tooltip: ExternalPlatformTooltips[platform],
87
79
  disabledReason: getDisabledReasonForExternalPlatform(
88
80
  isSNO,
89
81
  newFeatureSupportLevelContext,
@@ -162,18 +154,14 @@ export const ExternalPlatformDropdown = ({
162
154
  }, [dropdownIsDisabled, externalPlatformTypes]);
163
155
 
164
156
  const enabledItems = Object.keys(externalPlatformTypes).map((platform) => {
165
- const { label, href, tooltip, disabledReason } = externalPlatformTypes[
157
+ const { label, href, disabledReason } = externalPlatformTypes[
166
158
  platform as PlatformType
167
159
  ] as ExternalPlatformInfo;
168
160
  return (
169
161
  <DropdownItem key={platform} id={platform} isAriaDisabled={disabledReason !== undefined}>
170
162
  <Split>
171
163
  <SplitItem>
172
- <Tooltip
173
- hidden={disabledReason === undefined && tooltip === undefined}
174
- content={disabledReason !== undefined ? disabledReason : tooltip}
175
- position="top"
176
- >
164
+ <Tooltip hidden={!disabledReason} content={disabledReason} position="top">
177
165
  <div>
178
166
  {label}
179
167
  {platform === 'oci' && <DeveloperPreview testId={'oci-support-level`'} />}
@@ -5,7 +5,7 @@ export const ExternalPlatformLabels: { [key in PlatformType]: string } = {
5
5
  baremetal: 'No platform integration',
6
6
  none: 'No platform integration',
7
7
  nutanix: 'Nutanix',
8
- oci: 'Oracle (Requires a custom manifest)',
8
+ oci: 'Oracle Cloud Infrastructure (Requires a custom manifest)',
9
9
  vsphere: 'vSphere',
10
10
  };
11
11
 
@@ -14,10 +14,6 @@ export const ExternalPlatformLinks: Partial<{ [key in PlatformType]: string }> =
14
14
  vsphere: VSPHERE_CONFIG_LINK,
15
15
  };
16
16
 
17
- export const ExternalPlatformTooltips: Partial<{ [key in PlatformType]: string }> = {
18
- oci: "To integrate with an external partner (for example, Oracle Cloud), you'll need to provide a custom manifest.",
19
- };
20
-
21
17
  export const ExternalPlaformIds: { [key in PlatformType]: string } = {
22
18
  baremetal: '',
23
19
  none: '',
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useHistory } from 'react-router-dom';
3
3
  import { useDispatch } from 'react-redux';
4
- import { useAlerts, LoadingState, ClusterWizardStep } from '../../../common';
4
+ import { useAlerts, LoadingState, ClusterWizardStep, ErrorState } from '../../../common';
5
5
  import { usePullSecret } from '../../hooks';
6
6
  import { getApiErrorMessage, handleApiError, isUnknownServerError } from '../../api';
7
7
  import { setServerUpdateError, updateCluster } from '../../store/slices/current-cluster/slice';
@@ -34,9 +34,6 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
34
34
  const pullSecret = usePullSecret();
35
35
  const { error: errorOCPVersions, loading: loadingOCPVersions, versions } = useOpenshiftVersions();
36
36
  const { customManifests } = useClusterCustomManifests(cluster?.id || '', false);
37
- React.useEffect(() => {
38
- errorOCPVersions && addAlert(errorOCPVersions);
39
- }, [errorOCPVersions, addAlert]);
40
37
 
41
38
  const handleClusterUpdate = React.useCallback(
42
39
  async (clusterId: Cluster['id'], params: ClusterDetailsUpdateParams) => {
@@ -92,14 +89,22 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
92
89
  [clearAlerts, addAlert, dispatch, history, handleCustomManifestsChange],
93
90
  );
94
91
 
92
+ const navigation = <ClusterWizardNavigation cluster={cluster} />;
95
93
  if (pullSecret === undefined || !managedDomains || loadingOCPVersions || !usedClusterNames) {
96
94
  return (
97
- <ClusterWizardStep navigation={<ClusterWizardNavigation cluster={cluster} />}>
95
+ <ClusterWizardStep navigation={navigation}>
98
96
  <LoadingState />
99
97
  </ClusterWizardStep>
100
98
  );
101
99
  }
102
- const navigation = <ClusterWizardNavigation cluster={cluster} />;
100
+
101
+ if (!cluster && errorOCPVersions) {
102
+ return (
103
+ <ClusterWizardStep navigation={navigation}>
104
+ <ErrorState title="Failed to retrieve OpenShift versions" />
105
+ </ClusterWizardStep>
106
+ );
107
+ }
103
108
 
104
109
  return (
105
110
  <ClusterDetailsForm
@@ -1,5 +1,4 @@
1
1
  export { default as useOpenshiftVersions } from './useOpenshiftVersions';
2
- export { default as useClusterSupportedPlatforms } from './useClusterSupportedPlatforms';
3
2
  export { default as useManagedDomains } from './useManagedDomains';
4
3
  export { default as useUsedClusterNames } from './useUsedClusterNames';
5
4
  export { default as useInfraEnvId } from './useInfraEnvId';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "@openshift-assisted/locales": "2.9.6-cim",
4
- "@openshift-assisted/types": "2.9.6-cim",
3
+ "@openshift-assisted/locales": "2.9.7-cim",
4
+ "@openshift-assisted/types": "2.9.7-cim",
5
5
  "axios-case-converter": "^0.11.1",
6
6
  "camel-case": "^4.1.2",
7
7
  "cidr-tools": "^4.3.0",
@@ -26,7 +26,6 @@
26
26
  },
27
27
  "description": "React component library for the Assisted Installer UI",
28
28
  "devDependencies": {
29
- "@openshift-assisted/eslint-config-assisted-ui": "^1.0.0",
30
29
  "@tsconfig/recommended": "^1.0.2",
31
30
  "@types/file-saver": "^2.0.1",
32
31
  "@types/human-date": "^1.4.0",
@@ -128,5 +127,5 @@
128
127
  ]
129
128
  }
130
129
  },
131
- "version": "2.9.6-cim"
130
+ "version": "2.9.7-cim"
132
131
  }
@@ -1,11 +0,0 @@
1
- import { AxiosError } from 'axios';
2
- import { SupportedPlatformType } from '../../common';
3
- import { APIErrorMixin } from '../../common/api/utils';
4
- export type SupportedPlatformIntegrationType = 'no-active-integrations' | SupportedPlatformType;
5
- export default function useClusterSupportedPlatforms(clusterId: string): {
6
- isPlatformIntegrationSupported: boolean;
7
- supportedPlatformIntegration: SupportedPlatformIntegrationType;
8
- isLoading: boolean;
9
- error: AxiosError<APIErrorMixin, any> | undefined;
10
- };
11
- //# sourceMappingURL=useClusterSupportedPlatforms.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useClusterSupportedPlatforms.d.ts","sourceRoot":"","sources":["../../../../lib/ocm/hooks/useClusterSupportedPlatforms.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,EAKL,qBAAqB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,MAAM,MAAM,gCAAgC,GAAG,wBAAwB,GAAG,qBAAqB,CAAC;AAgBhG,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,SAAS,EAAE,MAAM;;;;;EAsCrE"}