@openshift-assisted/ui-lib 2.41.2 → 2.42.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/ClusterDeploymentDetailsForm.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/LabelsSelector.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/AddHostDropdown.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/EnvironmentDetails.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.d.ts.map +1 -1
- package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts +1 -0
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.d.ts +1 -0
- package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.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/DiskRole.d.ts.map +1 -1
- package/build/@types/common/components/hosts/TableToolbar.d.ts.map +1 -1
- package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -1
- package/build/@types/common/components/ui/ClusterEventsToolbar.d.ts.map +1 -1
- package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts +0 -1
- package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts.map +1 -1
- package/build/@types/common/components/ui/SimpleDropdown.d.ts +2 -2
- package/build/@types/common/components/ui/SimpleDropdown.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/common/config/docs_links.d.ts +1 -2
- package/build/@types/common/config/docs_links.d.ts.map +1 -1
- package/build/@types/common/index.d.ts +1 -0
- package/build/@types/common/index.d.ts.map +1 -1
- package/build/@types/common/types/ui-settings.d.ts +1 -0
- package/build/@types/common/types/ui-settings.d.ts.map +1 -1
- package/build/@types/common/utils.d.ts +8 -0
- package/build/@types/common/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmBaseDomainField.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmTNADisclaimer.d.ts +4 -0
- package/build/@types/ocm/components/clusterConfiguration/OcmTNADisclaimer.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/OperatorsSelect.d.ts.map +1 -1
- package/build/@types/ocm/components/hosts/use-hosts-table.d.ts.map +1 -1
- package/build/@types/ocm/services/DiskEncryptionService.d.ts +1 -1
- package/build/@types/ocm/services/DiskEncryptionService.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js +2 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/LabelsSelector.js +5 -5
- package/build/cjs/cim/components/ClusterDeployment/LabelsSelector.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js +29 -28
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js +16 -14
- package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -2
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js +4 -8
- package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js.map +1 -1
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +3 -3
- package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +1 -1
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/cim/components/modals/MassApproveAction.js +2 -2
- package/build/cjs/cim/components/modals/MassApproveAction.js.map +1 -1
- package/build/cjs/cim/components/modals/ScaleUpModal.js +3 -3
- package/build/cjs/cim/components/modals/ScaleUpModal.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +5 -6
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js +11 -6
- package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +2 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/hosts/DiskRole.js +5 -5
- package/build/cjs/common/components/hosts/DiskRole.js.map +1 -1
- package/build/cjs/common/components/hosts/HostToolbarActions.js +3 -3
- package/build/cjs/common/components/hosts/HostToolbarActions.js.map +1 -1
- package/build/cjs/common/components/hosts/TableToolbar.js +15 -15
- package/build/cjs/common/components/hosts/TableToolbar.js.map +1 -1
- package/build/cjs/common/components/operators/operatorSpecs.js +6 -4
- package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
- package/build/cjs/common/components/ui/ClusterEventsToolbar.js +1 -1
- package/build/cjs/common/components/ui/ClusterEventsToolbar.js.map +1 -1
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js +13 -16
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js.map +1 -1
- package/build/cjs/common/components/ui/SimpleDropdown.js +4 -5
- package/build/cjs/common/components/ui/SimpleDropdown.js.map +1 -1
- package/build/cjs/common/config/constants.js +10 -0
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/config/docs_links.js +41 -25
- package/build/cjs/common/config/docs_links.js.map +1 -1
- package/build/cjs/common/index.js +1 -0
- package/build/cjs/common/index.js.map +1 -1
- package/build/cjs/common/utils.js +27 -1
- package/build/cjs/common/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +18 -9
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js +3 -5
- package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js +15 -17
- package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js +5 -7
- package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmTNADisclaimer.js +14 -0
- package/build/cjs/ocm/components/clusterConfiguration/OcmTNADisclaimer.js.map +1 -0
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js +6 -8
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js +7 -10
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js +2 -1
- package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js +11 -13
- package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js +4 -0
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +7 -4
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js +6 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js +2 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js.map +1 -1
- package/build/cjs/ocm/components/hosts/use-hosts-table.js +9 -2
- package/build/cjs/ocm/components/hosts/use-hosts-table.js.map +1 -1
- package/build/cjs/ocm/services/DiskEncryptionService.js +11 -3
- package/build/cjs/ocm/services/DiskEncryptionService.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +4 -2
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx +8 -6
- package/lib/cim/components/ClusterDeployment/LabelsSelector.tsx +27 -14
- package/lib/cim/components/ClusterDeployment/ScaleUpForm.tsx +3 -0
- package/lib/cim/components/InfraEnv/AddHostDropdown.tsx +60 -47
- package/lib/cim/components/InfraEnv/EnvironmentDetails.tsx +7 -10
- package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +1 -1
- package/lib/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.tsx +34 -22
- package/lib/cim/components/common/CpuArchitectureDropdown.tsx +6 -3
- package/lib/cim/components/helpers/versions.ts +2 -2
- package/lib/cim/components/modals/MassApproveAction.tsx +1 -1
- package/lib/cim/components/modals/ScaleUpModal.tsx +5 -2
- package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +30 -17
- package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.tsx +20 -5
- package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.ts +1 -0
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +3 -0
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/hosts/DiskRole.tsx +23 -17
- package/lib/common/components/hosts/HostToolbarActions.tsx +1 -1
- package/lib/common/components/hosts/TableToolbar.tsx +54 -48
- package/lib/common/components/operators/operatorSpecs.tsx +7 -4
- package/lib/common/components/ui/ClusterEventsToolbar.tsx +1 -0
- package/lib/common/components/ui/OpenShiftVersionDropdown.tsx +38 -44
- package/lib/common/components/ui/SimpleDropdown.tsx +23 -22
- package/lib/common/config/constants.ts +11 -0
- package/lib/common/config/docs_links.ts +44 -30
- package/lib/common/index.ts +1 -0
- package/lib/common/types/ui-settings.ts +1 -0
- package/lib/common/utils.ts +30 -0
- package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +42 -11
- package/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +26 -20
- package/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx +47 -46
- package/lib/ocm/components/clusterConfiguration/OcmBaseDomainField.tsx +16 -13
- package/lib/ocm/components/clusterConfiguration/OcmTNADisclaimer.tsx +23 -0
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.tsx +25 -26
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.tsx +26 -30
- package/lib/ocm/components/clusterConfiguration/operators/utils.tsx +2 -1
- package/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx +34 -33
- package/lib/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.tsx +4 -0
- package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +15 -5
- package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +5 -1
- package/lib/ocm/components/clusterWizard/OperatorsSelect.tsx +5 -1
- package/lib/ocm/components/hosts/use-hosts-table.tsx +9 -3
- package/lib/ocm/services/DiskEncryptionService.ts +7 -1
- package/package.json +3 -3
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.css +0 -9
- package/lib/common/components/ui/OpenShiftVersionDropdown.css +0 -9
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const DiskEncryptionService = {
|
|
4
|
-
diskEncryptionEnableOn(isEnableOnMasters, isEnableOnWorkers) {
|
|
4
|
+
diskEncryptionEnableOn(isEnableOnMasters, isEnableOnWorkers, isEnableOnArbiters) {
|
|
5
5
|
let enableOnParam;
|
|
6
|
-
if (isEnableOnMasters && isEnableOnWorkers)
|
|
6
|
+
if (isEnableOnMasters && isEnableOnWorkers && isEnableOnArbiters)
|
|
7
7
|
enableOnParam = 'all';
|
|
8
|
+
else if (isEnableOnMasters && isEnableOnWorkers)
|
|
9
|
+
enableOnParam = 'masters,workers';
|
|
10
|
+
else if (isEnableOnMasters && isEnableOnArbiters)
|
|
11
|
+
enableOnParam = 'masters,arbiters';
|
|
12
|
+
else if (isEnableOnWorkers && isEnableOnArbiters)
|
|
13
|
+
enableOnParam = 'arbiters,workers';
|
|
14
|
+
else if (isEnableOnArbiters)
|
|
15
|
+
enableOnParam = 'arbiters';
|
|
8
16
|
else if (isEnableOnWorkers)
|
|
9
17
|
enableOnParam = 'workers';
|
|
10
18
|
else if (isEnableOnMasters)
|
|
@@ -20,7 +28,7 @@ const DiskEncryptionService = {
|
|
|
20
28
|
? values.enableDiskEncryptionOnMasters
|
|
21
29
|
? 'all'
|
|
22
30
|
: 'none'
|
|
23
|
-
: DiskEncryptionService.diskEncryptionEnableOn(values.enableDiskEncryptionOnMasters, values.enableDiskEncryptionOnWorkers),
|
|
31
|
+
: DiskEncryptionService.diskEncryptionEnableOn(values.enableDiskEncryptionOnMasters, values.enableDiskEncryptionOnWorkers, values.enableDiskEncryptionOnArbiters),
|
|
24
32
|
tangServers: values.diskEncryptionMode === 'tang'
|
|
25
33
|
? JSON.stringify(values.diskEncryptionTangServers)
|
|
26
34
|
: undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiskEncryptionService.js","sourceRoot":"","sources":["../../../../lib/ocm/services/DiskEncryptionService.ts"],"names":[],"mappings":";;AAMA,MAAM,qBAAqB,GAAG;IAC5B,sBAAsB,CACpB,iBAA0B,EAC1B,iBAA0B;
|
|
1
|
+
{"version":3,"file":"DiskEncryptionService.js","sourceRoot":"","sources":["../../../../lib/ocm/services/DiskEncryptionService.ts"],"names":[],"mappings":";;AAMA,MAAM,qBAAqB,GAAG;IAC5B,sBAAsB,CACpB,iBAA0B,EAC1B,iBAA0B,EAC1B,kBAA2B;QAE3B,IAAI,aAAyC,CAAC;QAC9C,IAAI,iBAAiB,IAAI,iBAAiB,IAAI,kBAAkB;YAAE,aAAa,GAAG,KAAK,CAAC;aACnF,IAAI,iBAAiB,IAAI,iBAAiB;YAAE,aAAa,GAAG,iBAAiB,CAAC;aAC9E,IAAI,iBAAiB,IAAI,kBAAkB;YAAE,aAAa,GAAG,kBAAkB,CAAC;aAChF,IAAI,iBAAiB,IAAI,kBAAkB;YAAE,aAAa,GAAG,kBAAkB,CAAC;aAChF,IAAI,kBAAkB;YAAE,aAAa,GAAG,UAAU,CAAC;aACnD,IAAI,iBAAiB;YAAE,aAAa,GAAG,SAAS,CAAC;aACjD,IAAI,iBAAiB;YAAE,aAAa,GAAG,SAAS,CAAC;;YACjD,aAAa,GAAG,MAAM,CAAC;QAC5B,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,uBAAuB,CAAC,MAA4B;QAClD,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,kBAAkB;YAC/B,QAAQ,EACN,MAAM,CAAC,oBAAoB,KAAK,MAAM;gBACpC,CAAC,CAAC,MAAM,CAAC,6BAA6B;oBACpC,CAAC,CAAC,KAAK;oBACP,CAAC,CAAC,MAAM;gBACV,CAAC,CAAC,qBAAqB,CAAC,sBAAsB,CAC1C,MAAM,CAAC,6BAA6B,EACpC,MAAM,CAAC,6BAA6B,EACpC,MAAM,CAAC,8BAA8B,CACtC;YACP,WAAW,EACT,MAAM,CAAC,kBAAkB,KAAK,MAAM;gBAClC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,yBAAyB,CAAC;gBAClD,CAAC,CAAC,SAAS;SAChB,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,kBAAe,qBAAqB,CAAC"}
|
|
@@ -112,7 +112,9 @@ const ClusterDeploymentDetailsForm: React.FC<ClusterDeploymentDetailsFormProps>
|
|
|
112
112
|
|
|
113
113
|
const [cpuArchitectures, allowHighlyAvailable] = React.useMemo(() => {
|
|
114
114
|
const cpuArchitectures = [CpuArchitecture.x86, CpuArchitecture.ARM, CpuArchitecture.s390x];
|
|
115
|
-
const version = allVersions.find(
|
|
115
|
+
const version = allVersions.find(
|
|
116
|
+
(ver) => ver.value === values.openshiftVersion || ver.version === forceOpenshiftVersion,
|
|
117
|
+
);
|
|
116
118
|
const isMulti = version?.cpuArchitectures?.[0] === CpuArchitecture.MULTI;
|
|
117
119
|
|
|
118
120
|
const highlyAvailableSupported = toNumber(version?.version?.split('.')?.[1]) >= 18;
|
|
@@ -120,7 +122,7 @@ const ClusterDeploymentDetailsForm: React.FC<ClusterDeploymentDetailsFormProps>
|
|
|
120
122
|
(isMulti ? cpuArchitectures : version?.cpuArchitectures) as SupportedCpuArchitecture[],
|
|
121
123
|
highlyAvailableSupported && !isMulti,
|
|
122
124
|
];
|
|
123
|
-
}, [allVersions, values.openshiftVersion]);
|
|
125
|
+
}, [allVersions, forceOpenshiftVersion, values.openshiftVersion]);
|
|
124
126
|
|
|
125
127
|
return (
|
|
126
128
|
<>
|
|
@@ -82,12 +82,14 @@ const ClusterDeploymentHostsDiscovery: React.FC<ClusterDeploymentHostsDiscoveryP
|
|
|
82
82
|
<DiscoveryInstructions />
|
|
83
83
|
</TextContent>
|
|
84
84
|
</GridItem>
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
<GridItem span={5}>
|
|
86
|
+
<AddHostDropdown
|
|
87
|
+
infraEnv={infraEnv}
|
|
88
|
+
agentClusterInstall={agentClusterInstall}
|
|
89
|
+
usedHostnames={usedHostnames}
|
|
90
|
+
{...rest}
|
|
91
|
+
/>
|
|
92
|
+
</GridItem>
|
|
91
93
|
<GridItem>
|
|
92
94
|
<TextContent>
|
|
93
95
|
<Text component="h3">{t('ai:Information and warnings')}</Text>
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import flatten from 'lodash-es/flatten.js';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Label,
|
|
5
|
+
LabelGroup,
|
|
6
|
+
Split,
|
|
7
|
+
SplitItem,
|
|
8
|
+
Dropdown,
|
|
9
|
+
DropdownItem,
|
|
10
|
+
MenuToggle,
|
|
11
|
+
MenuToggleElement,
|
|
12
|
+
DropdownList,
|
|
13
|
+
} from '@patternfly/react-core';
|
|
5
14
|
import { useField } from 'formik';
|
|
6
15
|
|
|
7
16
|
import { MultiSelectField } from '../../../common';
|
|
@@ -122,23 +131,27 @@ export const LabelSelectorGroup: React.FC<LabelsSelectorProps> = ({
|
|
|
122
131
|
</SplitItem>
|
|
123
132
|
<SplitItem>
|
|
124
133
|
<Dropdown
|
|
134
|
+
isOpen={addLabelOpen}
|
|
125
135
|
onSelect={() => setAddLabelOpen(false)}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
136
|
+
onOpenChange={() => setAddLabelOpen(!addLabelOpen)}
|
|
137
|
+
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
138
|
+
<MenuToggle
|
|
139
|
+
variant="plain"
|
|
140
|
+
className="pf-v5-u-w-100"
|
|
141
|
+
ref={toggleRef}
|
|
142
|
+
isFullWidth
|
|
143
|
+
onClick={() => setAddLabelOpen(!addLabelOpen)}
|
|
144
|
+
isExpanded={addLabelOpen}
|
|
131
145
|
>
|
|
132
146
|
<Label color="blue" variant="outline" className="pf-m-overflow">
|
|
133
147
|
{t('ai:Add label')}
|
|
134
148
|
</Label>
|
|
135
|
-
</
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
/>
|
|
149
|
+
</MenuToggle>
|
|
150
|
+
)}
|
|
151
|
+
shouldFocusToggleOnSelect
|
|
152
|
+
>
|
|
153
|
+
<DropdownList>{children}</DropdownList>
|
|
154
|
+
</Dropdown>
|
|
142
155
|
</SplitItem>
|
|
143
156
|
</Split>
|
|
144
157
|
);
|
|
@@ -14,6 +14,7 @@ import RadioField from '../../../common/components/ui/formik/RadioField';
|
|
|
14
14
|
type ScaleUpFormProps = {
|
|
15
15
|
agents: AgentK8sResource[];
|
|
16
16
|
onEditHost: AgentTableActions['onEditHost'];
|
|
17
|
+
onEditRole: AgentTableActions['onEditRole'];
|
|
17
18
|
onSetInstallationDiskId: AgentTableActions['onSetInstallationDiskId'];
|
|
18
19
|
isNutanix: boolean;
|
|
19
20
|
};
|
|
@@ -21,6 +22,7 @@ type ScaleUpFormProps = {
|
|
|
21
22
|
const ScaleUpForm: React.FC<ScaleUpFormProps> = ({
|
|
22
23
|
agents,
|
|
23
24
|
onEditHost,
|
|
25
|
+
onEditRole,
|
|
24
26
|
onSetInstallationDiskId,
|
|
25
27
|
isNutanix,
|
|
26
28
|
}) => {
|
|
@@ -73,6 +75,7 @@ const ScaleUpForm: React.FC<ScaleUpFormProps> = ({
|
|
|
73
75
|
<ClusterDeploymentHostsSelectionAdvanced<ScaleUpFormValues>
|
|
74
76
|
availableAgents={availableAgents}
|
|
75
77
|
onEditHost={onEditHost}
|
|
78
|
+
onEditRole={onEditRole}
|
|
76
79
|
onSetInstallationDiskId={onSetInstallationDiskId}
|
|
77
80
|
/>
|
|
78
81
|
)}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import { Split, SplitItem, Spinner } from '@patternfly/react-core';
|
|
2
1
|
import {
|
|
2
|
+
Split,
|
|
3
|
+
SplitItem,
|
|
4
|
+
Spinner,
|
|
3
5
|
Dropdown,
|
|
4
|
-
DropdownGroup,
|
|
5
6
|
DropdownItem,
|
|
6
7
|
DropdownItemProps,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
MenuToggle,
|
|
9
|
+
MenuToggleElement,
|
|
10
|
+
Divider,
|
|
11
|
+
DropdownList,
|
|
12
|
+
Popover,
|
|
13
|
+
Flex,
|
|
14
|
+
} from '@patternfly/react-core';
|
|
10
15
|
import * as React from 'react';
|
|
11
16
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
12
17
|
import { AddBmcHostModal, AddBmcHostYamlModal, AddHostModal } from '../modals';
|
|
13
18
|
import { AddHostDropdownProps } from './types';
|
|
14
19
|
import './AddHostDropdown.css';
|
|
15
|
-
import { PopoverIcon } from '../../../common';
|
|
16
20
|
import { Trans } from 'react-i18next';
|
|
17
21
|
import { Link } from 'react-router-dom-v5-compat';
|
|
22
|
+
import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/js/icons/outlined-question-circle-icon';
|
|
18
23
|
|
|
19
24
|
type ModalType = 'iso' | 'bmc' | 'yaml' | 'ipxe' | undefined;
|
|
20
25
|
|
|
@@ -50,21 +55,29 @@ const AddHostDropdown = ({
|
|
|
50
55
|
const [provisioningConfig, provisioningConfigLoaded, provisioningConfigError] =
|
|
51
56
|
provisioningConfigResult;
|
|
52
57
|
const { t } = useTranslation();
|
|
58
|
+
|
|
53
59
|
return (
|
|
54
60
|
<>
|
|
55
61
|
<Dropdown
|
|
56
62
|
id="infraenv-actions"
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
isOpen={isKebabOpen}
|
|
64
|
+
onSelect={() => setIsKebabOpen(false)}
|
|
65
|
+
onOpenChange={() => setIsKebabOpen(!isKebabOpen)}
|
|
66
|
+
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
67
|
+
<MenuToggle
|
|
59
68
|
id="dropdown-basic"
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
variant="primary"
|
|
70
|
+
ref={toggleRef}
|
|
71
|
+
onClick={() => setIsKebabOpen(!isKebabOpen)}
|
|
72
|
+
isExpanded={isKebabOpen}
|
|
62
73
|
>
|
|
63
74
|
{t('ai:Add hosts')}
|
|
64
|
-
</
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
75
|
+
</MenuToggle>
|
|
76
|
+
)}
|
|
77
|
+
shouldFocusToggleOnSelect
|
|
78
|
+
popperProps={{ preventOverflow: true }}
|
|
79
|
+
>
|
|
80
|
+
{[
|
|
68
81
|
<DropdownItem
|
|
69
82
|
key="discovery-iso"
|
|
70
83
|
onClick={() => {
|
|
@@ -85,36 +98,37 @@ const AddHostDropdown = ({
|
|
|
85
98
|
>
|
|
86
99
|
{t('ai:With iPXE')}
|
|
87
100
|
</DropdownItem>,
|
|
88
|
-
<
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
101
|
+
<Divider component="li" key="separator" />,
|
|
102
|
+
<DropdownList id="discovery-bmc" key="discovery-bmc" className="ai-discovery-bmc__group">
|
|
103
|
+
{!provisioningConfig && (
|
|
104
|
+
<DropdownItem
|
|
105
|
+
isAriaDisabled
|
|
106
|
+
className="pf-v5-u-color-200" // visually muted
|
|
107
|
+
component="div"
|
|
108
|
+
>
|
|
109
|
+
<Flex
|
|
110
|
+
alignItems={{ default: 'alignItemsCenter' }}
|
|
111
|
+
spaceItems={{ default: 'spaceItemsMd' }} // Changed to 'spaceItemsMd' for larger spacing
|
|
112
|
+
>
|
|
113
|
+
<span>{t('ai:Baseboard Management Controller (BMC)')}</span>
|
|
114
|
+
<Popover
|
|
115
|
+
triggerAction="hover"
|
|
116
|
+
position="top"
|
|
117
|
+
bodyContent={
|
|
118
|
+
<Trans t={t}>
|
|
119
|
+
ai:To enable the host's baseboard management controller (BMC) on the hub
|
|
120
|
+
cluster, you must first{' '}
|
|
121
|
+
<Link to="/k8s/cluster/metal3.io~v1alpha1~Provisioning/~new">
|
|
122
|
+
create a provisioning configuration.
|
|
123
|
+
</Link>
|
|
124
|
+
</Trans>
|
|
125
|
+
}
|
|
126
|
+
>
|
|
127
|
+
<OutlinedQuestionCircleIcon />
|
|
128
|
+
</Popover>
|
|
129
|
+
</Flex>
|
|
130
|
+
</DropdownItem>
|
|
131
|
+
)}
|
|
118
132
|
<DropdownItemWithLoading
|
|
119
133
|
key="with-credentials"
|
|
120
134
|
onClick={() => {
|
|
@@ -139,10 +153,9 @@ const AddHostDropdown = ({
|
|
|
139
153
|
isLoading={!provisioningConfigLoaded}
|
|
140
154
|
isDisabled={!provisioningConfig && !provisioningConfigError}
|
|
141
155
|
/>
|
|
142
|
-
</
|
|
156
|
+
</DropdownList>,
|
|
143
157
|
]}
|
|
144
|
-
|
|
145
|
-
/>
|
|
158
|
+
</Dropdown>
|
|
146
159
|
{addModalType === 'iso' && (
|
|
147
160
|
<AddHostModal
|
|
148
161
|
infraEnv={infraEnv}
|
|
@@ -20,12 +20,7 @@ import { PencilAltIcon } from '@patternfly/react-icons/dist/js/icons/pencil-alt-
|
|
|
20
20
|
import { global_palette_green_500 as okColor } from '@patternfly/react-tokens/dist/js/global_palette_green_500';
|
|
21
21
|
import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens/dist/js/global_warning_color_100';
|
|
22
22
|
|
|
23
|
-
import {
|
|
24
|
-
architectureData,
|
|
25
|
-
CpuArchitecture,
|
|
26
|
-
LabelValue,
|
|
27
|
-
SupportedCpuArchitecture,
|
|
28
|
-
} from '../../../common';
|
|
23
|
+
import { architectureData, LabelValue } from '../../../common';
|
|
29
24
|
import { InfraEnvK8sResource, SecretK8sResource } from '../../types';
|
|
30
25
|
import { AGENT_LOCATION_LABEL_KEY } from '../common';
|
|
31
26
|
import EditPullSecretModal, { EditPullSecretModalProps } from '../modals/EditPullSecretModal';
|
|
@@ -134,6 +129,11 @@ const EnvironmentDetails: React.FC<EnvironmentDetailsProps> = ({
|
|
|
134
129
|
infraEnv.spec?.proxy?.httpProxy ||
|
|
135
130
|
infraEnv.spec?.proxy?.httpsProxy ||
|
|
136
131
|
infraEnv.spec?.proxy?.noProxy;
|
|
132
|
+
|
|
133
|
+
const arch = infraEnv.spec?.cpuArchitecture
|
|
134
|
+
? architectureData[infraEnv.spec?.cpuArchitecture]?.label
|
|
135
|
+
: infraEnv.spec?.cpuArchitecture;
|
|
136
|
+
|
|
137
137
|
return (
|
|
138
138
|
<>
|
|
139
139
|
<Grid hasGutter>
|
|
@@ -164,10 +164,7 @@ const EnvironmentDetails: React.FC<EnvironmentDetailsProps> = ({
|
|
|
164
164
|
</DescriptionListGroup>
|
|
165
165
|
<DescriptionListGroup>
|
|
166
166
|
<DescriptionListTerm>{t('ai:CPU architecture')}</DescriptionListTerm>
|
|
167
|
-
<DescriptionListDescription>
|
|
168
|
-
{architectureData[infraEnv.spec?.cpuArchitecture as SupportedCpuArchitecture]
|
|
169
|
-
.label ?? CpuArchitecture.x86}
|
|
170
|
-
</DescriptionListDescription>
|
|
167
|
+
<DescriptionListDescription>{arch ?? '--'}</DescriptionListDescription>
|
|
171
168
|
</DescriptionListGroup>
|
|
172
169
|
|
|
173
170
|
{infraEnv.spec?.osImageVersion && (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Button, Stack, StackItem } from '@patternfly/react-core';
|
|
3
|
-
import { DropdownItem } from '@patternfly/react-core
|
|
3
|
+
import { DropdownItem } from '@patternfly/react-core';
|
|
4
4
|
|
|
5
5
|
import { Host } from '@openshift-assisted/types/assisted-installer-service';
|
|
6
6
|
import {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
FormGroup,
|
|
4
|
+
Tooltip,
|
|
5
|
+
Dropdown,
|
|
6
|
+
DropdownItem,
|
|
7
|
+
MenuToggle,
|
|
8
|
+
MenuToggleElement,
|
|
9
|
+
DropdownList,
|
|
10
|
+
} from '@patternfly/react-core';
|
|
4
11
|
import { useField } from 'formik';
|
|
5
12
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
6
13
|
import { architectureData, getFieldId, SupportedCpuArchitecture } from '../../../common';
|
|
@@ -13,9 +20,11 @@ const InfraEnvOpenShiftVersionDropdown = ({ osImages }: { osImages: OsImage[] })
|
|
|
13
20
|
const [osImageOpen, setOsImageOpen] = React.useState(false);
|
|
14
21
|
const fieldId = getFieldId(name, 'input');
|
|
15
22
|
|
|
16
|
-
const onOsImageSelect = (
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
const onOsImageSelect = (
|
|
24
|
+
event?: React.MouseEvent<Element, MouseEvent>,
|
|
25
|
+
val?: string | number,
|
|
26
|
+
) => {
|
|
27
|
+
setValue(val ? String(val) : '');
|
|
19
28
|
setOsImageOpen(false);
|
|
20
29
|
};
|
|
21
30
|
|
|
@@ -40,30 +49,33 @@ const InfraEnvOpenShiftVersionDropdown = ({ osImages }: { osImages: OsImage[] })
|
|
|
40
49
|
hidden={!!filteredImages.length}
|
|
41
50
|
>
|
|
42
51
|
<Dropdown
|
|
43
|
-
toggle={
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
53
|
+
<MenuToggle
|
|
54
|
+
ref={toggleRef}
|
|
55
|
+
isFullWidth
|
|
56
|
+
onClick={() => setOsImageOpen(!osImageOpen)}
|
|
57
|
+
isExpanded={osImageOpen}
|
|
47
58
|
isDisabled={!filteredImages.length}
|
|
48
59
|
>
|
|
49
60
|
{value ? `OpenShift ${value}` : t('ai:No version selected')}
|
|
50
|
-
</
|
|
51
|
-
}
|
|
52
|
-
name="osImageVersion"
|
|
61
|
+
</MenuToggle>
|
|
62
|
+
)}
|
|
53
63
|
isOpen={osImageOpen}
|
|
54
64
|
onSelect={onOsImageSelect}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
onOpenChange={() => setOsImageOpen(!osImageOpen)}
|
|
66
|
+
>
|
|
67
|
+
<DropdownList>
|
|
68
|
+
{filteredImages.map((image) => (
|
|
69
|
+
<DropdownItem
|
|
70
|
+
key={image.openshiftVersion}
|
|
71
|
+
id={image.openshiftVersion}
|
|
72
|
+
value={image.openshiftVersion}
|
|
73
|
+
>
|
|
61
74
|
{`OpenShift ${image.openshiftVersion}`}
|
|
62
75
|
</DropdownItem>
|
|
63
|
-
))
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
/>
|
|
76
|
+
))}
|
|
77
|
+
</DropdownList>
|
|
78
|
+
</Dropdown>
|
|
67
79
|
</Tooltip>
|
|
68
80
|
</FormGroup>
|
|
69
81
|
);
|
|
@@ -54,7 +54,7 @@ const CpuArchitectureDropdown = ({
|
|
|
54
54
|
isAriaDisabled={!isItemEnabled}
|
|
55
55
|
selected={arch === value}
|
|
56
56
|
description={architectureData[arch].description}
|
|
57
|
-
tooltipProps={{ content: disabledReason, position: 'top' }}
|
|
57
|
+
tooltipProps={{ content: disabledReason, position: 'top', hidden: isItemEnabled }}
|
|
58
58
|
onClick={(e: React.MouseEvent) => e.preventDefault()}
|
|
59
59
|
>
|
|
60
60
|
{architectureData[arch].label}
|
|
@@ -74,23 +74,26 @@ const CpuArchitectureDropdown = ({
|
|
|
74
74
|
return !isDisabled ? (
|
|
75
75
|
<FormGroup
|
|
76
76
|
isInline
|
|
77
|
-
|
|
77
|
+
id={`form-control__${fieldId}`}
|
|
78
78
|
label={t('ai:CPU architecture')}
|
|
79
79
|
isRequired
|
|
80
80
|
name={'cpuArchiteture'}
|
|
81
81
|
>
|
|
82
82
|
<Dropdown
|
|
83
|
+
id={`${fieldId}-dropdown`}
|
|
83
84
|
toggle={(toggleRef) => (
|
|
84
85
|
<MenuToggle
|
|
86
|
+
id={fieldId}
|
|
85
87
|
ref={toggleRef}
|
|
86
88
|
onClick={() => setCpuArchOpen(!cpuArchOpen)}
|
|
87
|
-
className="pf-u-w-100"
|
|
89
|
+
className="pf-v5-u-w-100"
|
|
88
90
|
>
|
|
89
91
|
{value ? architectureData[value].label : t('ai:CPU architecture')}
|
|
90
92
|
</MenuToggle>
|
|
91
93
|
)}
|
|
92
94
|
isOpen={cpuArchOpen}
|
|
93
95
|
onSelect={onCpuArchSelect}
|
|
96
|
+
onOpenChange={() => setCpuArchOpen(!cpuArchOpen)}
|
|
94
97
|
>
|
|
95
98
|
{dropdownItems}
|
|
96
99
|
</Dropdown>
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from '../../types';
|
|
9
9
|
import { CpuArchitecture, OpenshiftVersionOptionType } from '../../../common';
|
|
10
10
|
import { OpenshiftVersion } from '@openshift-assisted/types/assisted-installer-service';
|
|
11
|
-
import {
|
|
11
|
+
import { isMajorMinorVersionEqualOrGreater } from '../../../common/utils';
|
|
12
12
|
|
|
13
13
|
export const getVersionFromReleaseImage = (releaseImage = '') => {
|
|
14
14
|
const match = /.+:(\d+\.\d+(?:\.\d+)?(?:-\w+)?)/gm.exec(releaseImage);
|
|
@@ -124,4 +124,4 @@ export const getCurrentClusterVersion = (cv?: ClusterVersionK8sResource): string
|
|
|
124
124
|
export const getNetworkType = (
|
|
125
125
|
ocpVersion: OpenshiftVersionOptionType | undefined,
|
|
126
126
|
): 'OVNKubernetes' | 'OpenShiftSDN' =>
|
|
127
|
-
|
|
127
|
+
isMajorMinorVersionEqualOrGreater(ocpVersion?.version, '4.12') ? 'OVNKubernetes' : 'OpenShiftSDN';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DropdownItem } from '@patternfly/react-core
|
|
2
|
+
import { DropdownItem } from '@patternfly/react-core';
|
|
3
3
|
import { AgentK8sResource } from '../../types';
|
|
4
4
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
5
5
|
|
|
@@ -63,6 +63,7 @@ type ScaleUpModalProps = {
|
|
|
63
63
|
onChangeBMHHostname: (bmh: BareMetalHostK8sResource, hostname: string) => Promise<unknown>;
|
|
64
64
|
onSetInstallationDiskId: AgentTableActions['onSetInstallationDiskId'];
|
|
65
65
|
isNutanix: boolean;
|
|
66
|
+
onEditHostRole: (agent: AgentK8sResource, role: string | undefined) => Promise<AgentK8sResource>;
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
const ScaleUpModal: React.FC<ScaleUpModalProps> = ({
|
|
@@ -76,6 +77,7 @@ const ScaleUpModal: React.FC<ScaleUpModalProps> = ({
|
|
|
76
77
|
onChangeBMHHostname,
|
|
77
78
|
onSetInstallationDiskId,
|
|
78
79
|
isNutanix,
|
|
80
|
+
onEditHostRole,
|
|
79
81
|
}) => {
|
|
80
82
|
const [editAgent, setEditAgent] = React.useState<AgentK8sResource | undefined>();
|
|
81
83
|
const [error, setError] = React.useState<string | undefined>();
|
|
@@ -123,8 +125,8 @@ const ScaleUpModal: React.FC<ScaleUpModalProps> = ({
|
|
|
123
125
|
return (
|
|
124
126
|
<>
|
|
125
127
|
<Modal
|
|
126
|
-
aria-label={t('ai:Add
|
|
127
|
-
title={t('ai:Add
|
|
128
|
+
aria-label={t('ai:Add host dialog')}
|
|
129
|
+
title={t('ai:Add hosts')}
|
|
128
130
|
isOpen={isOpen}
|
|
129
131
|
onClose={onClose}
|
|
130
132
|
hasNoBodyWrapper
|
|
@@ -145,6 +147,7 @@ const ScaleUpModal: React.FC<ScaleUpModalProps> = ({
|
|
|
145
147
|
<ScaleUpForm
|
|
146
148
|
agents={agents}
|
|
147
149
|
onEditHost={setEditAgent}
|
|
150
|
+
onEditRole={onEditHostRole}
|
|
148
151
|
onSetInstallationDiskId={onSetInstallationDiskId}
|
|
149
152
|
isNutanix={isNutanix}
|
|
150
153
|
/>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
FormGroup,
|
|
4
|
+
Tooltip,
|
|
5
|
+
Dropdown,
|
|
6
|
+
DropdownItem,
|
|
7
|
+
MenuToggle,
|
|
8
|
+
MenuToggleElement,
|
|
9
|
+
DropdownList,
|
|
10
|
+
} from '@patternfly/react-core';
|
|
4
11
|
import { useTranslation } from '../../hooks/use-translation-wrapper';
|
|
5
12
|
import { getFieldId, StaticField } from '../..';
|
|
6
13
|
import { useField } from 'formik';
|
|
@@ -55,29 +62,35 @@ const ControlPlaneNodesDropdown = ({
|
|
|
55
62
|
);
|
|
56
63
|
});
|
|
57
64
|
|
|
58
|
-
const onControlPlaneSelect = (
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
const onControlPlaneSelect = (
|
|
66
|
+
e?: React.MouseEvent<Element, MouseEvent>,
|
|
67
|
+
value?: string | number,
|
|
68
|
+
) => {
|
|
69
|
+
setValue(toNumber(value));
|
|
61
70
|
setControlPlanelOpen(false);
|
|
62
71
|
};
|
|
63
72
|
|
|
64
73
|
return !isDisabled ? (
|
|
65
74
|
<FormGroup isInline fieldId={fieldId} label={t('ai:Number of control plane nodes')} isRequired>
|
|
66
75
|
<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
76
|
isOpen={controlPlanelOpen}
|
|
77
77
|
onSelect={onControlPlaneSelect}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
onOpenChange={() => setControlPlanelOpen(!controlPlanelOpen)}
|
|
79
|
+
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
80
|
+
<MenuToggle
|
|
81
|
+
className="pf-v5-u-w-100"
|
|
82
|
+
ref={toggleRef}
|
|
83
|
+
isFullWidth
|
|
84
|
+
onClick={() => setControlPlanelOpen(!controlPlanelOpen)}
|
|
85
|
+
isExpanded={controlPlanelOpen}
|
|
86
|
+
>
|
|
87
|
+
{selectedValue ? selectedValue : '3'}
|
|
88
|
+
</MenuToggle>
|
|
89
|
+
)}
|
|
90
|
+
shouldFocusToggleOnSelect
|
|
91
|
+
>
|
|
92
|
+
<DropdownList>{dropdownItems}</DropdownList>
|
|
93
|
+
</Dropdown>
|
|
81
94
|
</FormGroup>
|
|
82
95
|
) : (
|
|
83
96
|
<StaticField
|