@openshift-assisted/ui-lib 2.46.3 → 2.47.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/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/agent-cluster-install.d.ts +1 -0
- package/build/@types/cim/types/k8s/agent-cluster-install.d.ts.map +1 -1
- package/build/@types/common/api/assisted-service/BundleAPI.d.ts +2 -2
- package/build/@types/common/api/assisted-service/ClustersAPI.d.ts +25 -25
- package/build/@types/common/api/assisted-service/ComponentVersionsAPI.d.ts +1 -1
- package/build/@types/common/api/assisted-service/EventsAPI.d.ts +1 -1
- package/build/@types/common/api/assisted-service/HostsAPI.d.ts +6 -6
- package/build/@types/common/api/assisted-service/InfraEnvsAPI.d.ts +7 -7
- package/build/@types/common/api/assisted-service/ManagedDomainsAPI.d.ts +1 -1
- package/build/@types/common/api/assisted-service/NewFeatureSupportLevelsAPI.d.ts +2 -2
- package/build/@types/common/api/assisted-service/OperatorsAPI.d.ts +1 -1
- package/build/@types/common/api/assisted-service/SupportedOpenshiftVersionsAPI.d.ts +1 -1
- package/build/@types/common/api/assisted-service/UISettingsAPI.d.ts +2 -2
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +2 -1
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/DownloadIso.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/OcmTNADisclaimer.d.ts.map +1 -0
- package/build/@types/common/components/clusterConfiguration/utils.d.ts +3 -1
- package/build/@types/common/components/clusterConfiguration/utils.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/utils.test.d.ts +2 -0
- package/build/@types/common/components/clusterConfiguration/utils.test.d.ts.map +1 -0
- package/build/@types/common/components/ui/formik/validationSchemas.d.ts +1 -1
- package/build/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
- package/build/@types/common/config/constants.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/ExpandedManifest.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.d.ts +2 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.d.ts +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/ClusterProperties.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/ClusterProperties.test.d.ts +2 -0
- package/build/@types/ocm/components/clusterDetail/ClusterProperties.test.d.ts.map +1 -0
- package/build/@types/ocm/services/ClustersService.d.ts +5 -5
- package/build/@types/ocm/services/HostsService.d.ts +11 -11
- package/build/@types/ocm/services/InfraEnvsService.d.ts +2 -2
- package/build/@types/ocm/services/UISettingsService.d.ts +1 -1
- package/build/@types/ocm/store/slices/infra-envs/thunks.d.ts +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +9 -5
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +23 -6
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DownloadIso.js +1 -2
- package/build/cjs/common/components/clusterConfiguration/DownloadIso.js.map +1 -1
- package/build/cjs/{ocm → common}/components/clusterConfiguration/OcmTNADisclaimer.js +1 -1
- package/build/cjs/common/components/clusterConfiguration/OcmTNADisclaimer.js.map +1 -0
- package/build/cjs/common/components/clusterConfiguration/utils.js +23 -12
- package/build/cjs/common/components/clusterConfiguration/utils.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/utils.test.js +242 -0
- package/build/cjs/common/components/clusterConfiguration/utils.test.js.map +1 -0
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/ui/formik/validationSchemas.js +13 -3
- package/build/cjs/common/components/ui/formik/validationSchemas.js.map +1 -1
- package/build/cjs/common/config/constants.js +5 -10
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/ExpandedManifest.js +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/ExpandedManifest.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.js +55 -13
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.js +49 -12
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js +3 -3
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.js +67 -7
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js +28 -4
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.js +7 -16
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js +8 -8
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.js +26 -8
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.js +5 -5
- package/build/cjs/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.js +2 -2
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.test.js +180 -0
- package/build/cjs/ocm/components/clusterDetail/ClusterProperties.test.js.map +1 -0
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +17 -35
- package/lib/cim/types/k8s/agent-cluster-install.ts +1 -0
- package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +61 -31
- package/lib/common/components/clusterConfiguration/DownloadIso.tsx +5 -2
- package/lib/{ocm → common}/components/clusterConfiguration/OcmTNADisclaimer.tsx +1 -1
- package/lib/common/components/clusterConfiguration/utils.test.ts +275 -0
- package/lib/common/components/clusterConfiguration/utils.ts +28 -9
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -1
- package/lib/common/components/ui/formik/_validationSchemas.test.ts +82 -0
- package/lib/common/components/ui/formik/validationSchemas.ts +16 -10
- package/lib/common/config/constants.ts +5 -11
- package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/ExpandedManifest.tsx +1 -7
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/AdvancedNetworkFields.tsx +59 -13
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/AvailableSubnetsControl.tsx +98 -38
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfiguration.tsx +3 -2
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/NetworkConfigurationForm.tsx +3 -2
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/StackTypeControl.tsx +78 -11
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.tsx +65 -8
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/VirtualIPControlGroup.tsx +4 -9
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts +17 -6
- package/lib/ocm/components/clusterConfiguration/review/ReviewNetworkingTable.tsx +34 -4
- package/lib/ocm/components/clusterConfiguration/review/ReviewPreflightChecks.tsx +7 -9
- package/lib/ocm/components/clusterDetail/ClusterProperties.test.ts +215 -0
- package/lib/ocm/components/clusterDetail/ClusterProperties.tsx +2 -2
- package/package.json +3 -3
- package/build/@types/ocm/components/clusterConfiguration/OcmTNADisclaimer.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/UserManagedNetworkingTextContent.d.ts +0 -6
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/UserManagedNetworkingTextContent.d.ts.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmTNADisclaimer.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/UserManagedNetworkingTextContent.js +0 -25
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/UserManagedNetworkingTextContent.js.map +0 -1
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/UserManagedNetworkingTextContent.tsx +0 -30
- /package/build/@types/{ocm → common}/components/clusterConfiguration/OcmTNADisclaimer.d.ts +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { test, describe, expect } from 'vitest';
|
|
2
|
+
import { getStackTypeLabel } from './ClusterProperties';
|
|
3
|
+
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
4
|
+
|
|
5
|
+
const createCluster = (overrides: Partial<Cluster> = {}): Cluster =>
|
|
6
|
+
({
|
|
7
|
+
id: 'test-cluster',
|
|
8
|
+
name: 'test-cluster',
|
|
9
|
+
kind: 'Cluster',
|
|
10
|
+
href: '/api/assisted-install/v2/clusters/test-cluster',
|
|
11
|
+
openshiftVersion: '4.11',
|
|
12
|
+
status: 'ready',
|
|
13
|
+
statusInfo: 'Cluster is ready',
|
|
14
|
+
machineNetworks: [],
|
|
15
|
+
clusterNetworks: [],
|
|
16
|
+
serviceNetworks: [],
|
|
17
|
+
...overrides,
|
|
18
|
+
} as Cluster);
|
|
19
|
+
|
|
20
|
+
const createMachineNetwork = (cidr: string) => ({ cidr, clusterId: 'test' });
|
|
21
|
+
const createClusterNetwork = (cidr: string, hostPrefix: number) => ({
|
|
22
|
+
cidr,
|
|
23
|
+
hostPrefix,
|
|
24
|
+
clusterId: 'test',
|
|
25
|
+
});
|
|
26
|
+
const createServiceNetwork = (cidr: string) => ({ cidr, clusterId: 'test' });
|
|
27
|
+
|
|
28
|
+
describe('getStackTypeLabel', () => {
|
|
29
|
+
describe('OCP < 4.12 (legacy behavior)', () => {
|
|
30
|
+
test('returns "Dual-stack" for valid dual stack with IPv4 primary', () => {
|
|
31
|
+
const cluster = createCluster({
|
|
32
|
+
openshiftVersion: '4.11',
|
|
33
|
+
machineNetworks: [
|
|
34
|
+
createMachineNetwork('192.168.1.0/24'),
|
|
35
|
+
createMachineNetwork('2001:db8::/64'),
|
|
36
|
+
],
|
|
37
|
+
clusterNetworks: [
|
|
38
|
+
createClusterNetwork('10.128.0.0/14', 23),
|
|
39
|
+
createClusterNetwork('fd01::/48', 64),
|
|
40
|
+
],
|
|
41
|
+
serviceNetworks: [
|
|
42
|
+
createServiceNetwork('172.30.0.0/16'),
|
|
43
|
+
createServiceNetwork('fd02::/112'),
|
|
44
|
+
],
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
expect(getStackTypeLabel(cluster)).toBe('Dual-stack');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('returns "IPv4" for single stack', () => {
|
|
51
|
+
const cluster = createCluster({
|
|
52
|
+
openshiftVersion: '4.11',
|
|
53
|
+
machineNetworks: [createMachineNetwork('192.168.1.0/24')],
|
|
54
|
+
clusterNetworks: [createClusterNetwork('10.128.0.0/14', 23)],
|
|
55
|
+
serviceNetworks: [createServiceNetwork('172.30.0.0/16')],
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
expect(getStackTypeLabel(cluster)).toBe('IPv4');
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test('returns "IPv4" for IPv6 primary (invalid for OCP < 4.12)', () => {
|
|
62
|
+
const cluster = createCluster({
|
|
63
|
+
openshiftVersion: '4.11',
|
|
64
|
+
machineNetworks: [
|
|
65
|
+
createMachineNetwork('2001:db8::/64'),
|
|
66
|
+
createMachineNetwork('192.168.1.0/24'),
|
|
67
|
+
],
|
|
68
|
+
clusterNetworks: [
|
|
69
|
+
createClusterNetwork('fd01::/48', 64),
|
|
70
|
+
createClusterNetwork('10.128.0.0/14', 23),
|
|
71
|
+
],
|
|
72
|
+
serviceNetworks: [
|
|
73
|
+
createServiceNetwork('fd02::/112'),
|
|
74
|
+
createServiceNetwork('172.30.0.0/16'),
|
|
75
|
+
],
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
expect(getStackTypeLabel(cluster)).toBe('IPv4');
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
describe('OCP >= 4.12 (new behavior)', () => {
|
|
83
|
+
test('returns "Dual-stack" for IPv4 primary and IPv6 secondary', () => {
|
|
84
|
+
const cluster = createCluster({
|
|
85
|
+
openshiftVersion: '4.12',
|
|
86
|
+
machineNetworks: [
|
|
87
|
+
createMachineNetwork('192.168.1.0/24'),
|
|
88
|
+
createMachineNetwork('2001:db8::/64'),
|
|
89
|
+
],
|
|
90
|
+
clusterNetworks: [
|
|
91
|
+
createClusterNetwork('10.128.0.0/14', 23),
|
|
92
|
+
createClusterNetwork('fd01::/48', 64),
|
|
93
|
+
],
|
|
94
|
+
serviceNetworks: [
|
|
95
|
+
createServiceNetwork('172.30.0.0/16'),
|
|
96
|
+
createServiceNetwork('fd02::/112'),
|
|
97
|
+
],
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
expect(getStackTypeLabel(cluster)).toBe('Dual-stack');
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
test('returns "Dual-stack" for IPv6 primary and IPv4 secondary', () => {
|
|
104
|
+
const cluster = createCluster({
|
|
105
|
+
openshiftVersion: '4.12',
|
|
106
|
+
machineNetworks: [
|
|
107
|
+
createMachineNetwork('2001:db8::/64'),
|
|
108
|
+
createMachineNetwork('192.168.1.0/24'),
|
|
109
|
+
],
|
|
110
|
+
clusterNetworks: [
|
|
111
|
+
createClusterNetwork('fd01::/48', 64),
|
|
112
|
+
createClusterNetwork('10.128.0.0/14', 23),
|
|
113
|
+
],
|
|
114
|
+
serviceNetworks: [
|
|
115
|
+
createServiceNetwork('fd02::/112'),
|
|
116
|
+
createServiceNetwork('172.30.0.0/16'),
|
|
117
|
+
],
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
expect(getStackTypeLabel(cluster)).toBe('Dual-stack');
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
test('returns "IPv4" for IPv6 primary and IPv6 secondary (not dual-stack)', () => {
|
|
124
|
+
const cluster = createCluster({
|
|
125
|
+
openshiftVersion: '4.12',
|
|
126
|
+
machineNetworks: [
|
|
127
|
+
createMachineNetwork('2001:db8::/64'),
|
|
128
|
+
createMachineNetwork('2001:db9::/64'),
|
|
129
|
+
],
|
|
130
|
+
clusterNetworks: [
|
|
131
|
+
createClusterNetwork('fd01::/48', 64),
|
|
132
|
+
createClusterNetwork('fd02::/48', 64),
|
|
133
|
+
],
|
|
134
|
+
serviceNetworks: [createServiceNetwork('fd03::/112'), createServiceNetwork('fd04::/112')],
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
expect(getStackTypeLabel(cluster)).toBe('IPv4');
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
test('returns "IPv4" for IPv4 primary and IPv4 secondary (not dual-stack)', () => {
|
|
141
|
+
const cluster = createCluster({
|
|
142
|
+
openshiftVersion: '4.12',
|
|
143
|
+
machineNetworks: [
|
|
144
|
+
createMachineNetwork('192.168.1.0/24'),
|
|
145
|
+
createMachineNetwork('10.0.0.0/24'),
|
|
146
|
+
],
|
|
147
|
+
clusterNetworks: [
|
|
148
|
+
createClusterNetwork('10.128.0.0/14', 23),
|
|
149
|
+
createClusterNetwork('172.16.0.0/14', 23),
|
|
150
|
+
],
|
|
151
|
+
serviceNetworks: [
|
|
152
|
+
createServiceNetwork('172.30.0.0/16'),
|
|
153
|
+
createServiceNetwork('172.31.0.0/16'),
|
|
154
|
+
],
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
expect(getStackTypeLabel(cluster)).toBe('IPv4');
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
test('returns "IPv4" for single stack', () => {
|
|
161
|
+
const cluster = createCluster({
|
|
162
|
+
openshiftVersion: '4.12',
|
|
163
|
+
machineNetworks: [createMachineNetwork('192.168.1.0/24')],
|
|
164
|
+
clusterNetworks: [createClusterNetwork('10.128.0.0/14', 23)],
|
|
165
|
+
serviceNetworks: [createServiceNetwork('172.30.0.0/16')],
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
expect(getStackTypeLabel(cluster)).toBe('IPv4');
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
describe('edge cases', () => {
|
|
173
|
+
test('handles undefined openshiftVersion', () => {
|
|
174
|
+
const cluster = createCluster({
|
|
175
|
+
openshiftVersion: undefined,
|
|
176
|
+
machineNetworks: [
|
|
177
|
+
createMachineNetwork('192.168.1.0/24'),
|
|
178
|
+
createMachineNetwork('2001:db8::/64'),
|
|
179
|
+
],
|
|
180
|
+
clusterNetworks: [
|
|
181
|
+
createClusterNetwork('10.128.0.0/14', 23),
|
|
182
|
+
createClusterNetwork('fd01::/48', 64),
|
|
183
|
+
],
|
|
184
|
+
serviceNetworks: [
|
|
185
|
+
createServiceNetwork('172.30.0.0/16'),
|
|
186
|
+
createServiceNetwork('fd02::/112'),
|
|
187
|
+
],
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
expect(getStackTypeLabel(cluster)).toBe('Dual-stack');
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
test('handles empty networks', () => {
|
|
194
|
+
const cluster = createCluster({
|
|
195
|
+
openshiftVersion: '4.12',
|
|
196
|
+
machineNetworks: [],
|
|
197
|
+
clusterNetworks: [],
|
|
198
|
+
serviceNetworks: [],
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
expect(getStackTypeLabel(cluster)).toBe('IPv4');
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
test('handles undefined networks', () => {
|
|
205
|
+
const cluster = createCluster({
|
|
206
|
+
openshiftVersion: '4.12',
|
|
207
|
+
machineNetworks: undefined,
|
|
208
|
+
clusterNetworks: undefined,
|
|
209
|
+
serviceNetworks: undefined,
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
expect(getStackTypeLabel(cluster)).toBe('IPv4');
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
});
|
|
@@ -41,7 +41,7 @@ export const getManagementType = ({ userManagedNetworking }: Cluster): string =>
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
export const getStackTypeLabel = (cluster: Cluster): string =>
|
|
44
|
-
isDualStack(cluster) ? 'Dual-stack' : 'IPv4';
|
|
44
|
+
isDualStack({ ...cluster, openshiftVersion: cluster.openshiftVersion }) ? 'Dual-stack' : 'IPv4';
|
|
45
45
|
|
|
46
46
|
export const getDiskEncryptionEnabledOnStatus = (diskEncryption: DiskEncryption['enableOn']) => {
|
|
47
47
|
let diskEncryptionType = null;
|
|
@@ -67,7 +67,7 @@ export const getDiskEncryptionEnabledOnStatus = (diskEncryption: DiskEncryption[
|
|
|
67
67
|
|
|
68
68
|
const ClusterProperties = ({ cluster, externalMode = false }: ClusterPropertiesProps) => {
|
|
69
69
|
const { t } = useTranslation();
|
|
70
|
-
const isDualStackType = isDualStack(cluster);
|
|
70
|
+
const isDualStackType = isDualStack({ ...cluster, openshiftVersion: cluster.openshiftVersion });
|
|
71
71
|
const featureSupportLevelContext = useNewFeatureSupportLevel();
|
|
72
72
|
|
|
73
73
|
const activeFeatureConfiguration = featureSupportLevelContext.activeFeatureConfiguration;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@openshift-assisted/locales": "2.
|
|
4
|
-
"@openshift-assisted/types": "2.
|
|
3
|
+
"@openshift-assisted/locales": "2.47.0",
|
|
4
|
+
"@openshift-assisted/types": "2.47.0",
|
|
5
5
|
"@openshift-console/dynamic-plugin-sdk": "0.0.3",
|
|
6
6
|
"@patternfly/patternfly": "6.2.3",
|
|
7
7
|
"@patternfly/react-code-editor": "6.2.2",
|
|
@@ -140,5 +140,5 @@
|
|
|
140
140
|
]
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
"version": "2.
|
|
143
|
+
"version": "2.47.0"
|
|
144
144
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OcmTNADisclaimer.d.ts","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusterConfiguration/OcmTNADisclaimer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,QAAA,MAAM,gBAAgB,yBAgBrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface UserManagedNetworkingTextContentProps {
|
|
3
|
-
shouldDisplayLoadBalancersBullet?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const UserManagedNetworkingTextContent: ({ shouldDisplayLoadBalancersBullet, }: UserManagedNetworkingTextContentProps) => React.JSX.Element;
|
|
6
|
-
//# sourceMappingURL=UserManagedNetworkingTextContent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserManagedNetworkingTextContent.d.ts","sourceRoot":"","sources":["../../../../../../lib/ocm/components/clusterConfiguration/networkConfiguration/UserManagedNetworkingTextContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,qCAAqC;IACpD,gCAAgC,CAAC,EAAE,OAAO,CAAC;CAC5C;AAED,eAAO,MAAM,gCAAgC,0CAE1C,qCAAqC,sBAkBvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OcmTNADisclaimer.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusterConfiguration/OcmTNADisclaimer.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,uDAA6E;AAC7E,2FAA+E;AAE/E,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,wCAAc,GAAE,CAAC;IAE/B,OAAO,CACL,8BAAC,kBAAK,IACJ,OAAO,EAAE,yBAAY,CAAC,IAAI,EAC1B,KAAK,EAAE,CAAC,CAAC,sDAAsD,CAAC,EAChE,QAAQ;QAER,8BAAC,iBAAI;YACH,8BAAC,qBAAQ,QACN,CAAC,CAAC,+EAA+E,CAAC,CAC1E,CACN,CACD,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserManagedNetworkingTextContent = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const react_core_1 = require("@patternfly/react-core");
|
|
7
|
-
const ui_1 = require("../../../../common/components/ui");
|
|
8
|
-
const docs_links_1 = require("../../../../common/config/docs_links");
|
|
9
|
-
const UserManagedNetworkingTextContent = ({ shouldDisplayLoadBalancersBullet = false, }) => {
|
|
10
|
-
return (react_1.default.createElement(react_core_1.Content, null,
|
|
11
|
-
react_1.default.createElement(react_core_1.Content, { component: 'p' },
|
|
12
|
-
"Please refer to the",
|
|
13
|
-
' ',
|
|
14
|
-
react_1.default.createElement(ui_1.ExternalLink, { href: (0, docs_links_1.getOpenShiftNetworkingDocsLink)() }, "OpenShift networking documentation"),
|
|
15
|
-
' ',
|
|
16
|
-
"to configure your cluster's networking, including:",
|
|
17
|
-
' '),
|
|
18
|
-
react_1.default.createElement(react_core_1.List, null,
|
|
19
|
-
react_1.default.createElement(react_core_1.ListItem, null, "DHCP or static IP Addresses"),
|
|
20
|
-
shouldDisplayLoadBalancersBullet && react_1.default.createElement(react_core_1.ListItem, null, "Load balancers"),
|
|
21
|
-
react_1.default.createElement(react_core_1.ListItem, null, "Network ports"),
|
|
22
|
-
react_1.default.createElement(react_core_1.ListItem, null, "DNS"))));
|
|
23
|
-
};
|
|
24
|
-
exports.UserManagedNetworkingTextContent = UserManagedNetworkingTextContent;
|
|
25
|
-
//# sourceMappingURL=UserManagedNetworkingTextContent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserManagedNetworkingTextContent.js","sourceRoot":"","sources":["../../../../../../lib/ocm/components/clusterConfiguration/networkConfiguration/UserManagedNetworkingTextContent.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,uDAAiE;AACjE,yDAAgE;AAChE,qEAAsF;AAM/E,MAAM,gCAAgC,GAAG,CAAC,EAC/C,gCAAgC,GAAG,KAAK,GACF,EAAE,EAAE;IAC1C,OAAO,CACL,8BAAC,oBAAO;QACN,8BAAC,oBAAO,IAAC,SAAS,EAAE,GAAG;;YACD,GAAG;YACvB,8BAAC,iBAAY,IAAC,IAAI,EAAE,IAAA,2CAA8B,GAAE,yCAErC;YAAC,GAAG;;YACgC,GAAG,CAC9C;QACV,8BAAC,iBAAI;YACH,8BAAC,qBAAQ,sCAAuC;YAC/C,gCAAgC,IAAI,8BAAC,qBAAQ,yBAA0B;YACxE,8BAAC,qBAAQ,wBAAyB;YAClC,8BAAC,qBAAQ,cAAe,CACnB,CACC,CACX,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,gCAAgC,oCAoB3C"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { List, ListItem, Content } from '@patternfly/react-core';
|
|
3
|
-
import { ExternalLink } from '../../../../common/components/ui';
|
|
4
|
-
import { getOpenShiftNetworkingDocsLink } from '../../../../common/config/docs_links';
|
|
5
|
-
|
|
6
|
-
export interface UserManagedNetworkingTextContentProps {
|
|
7
|
-
shouldDisplayLoadBalancersBullet?: boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const UserManagedNetworkingTextContent = ({
|
|
11
|
-
shouldDisplayLoadBalancersBullet = false,
|
|
12
|
-
}: UserManagedNetworkingTextContentProps) => {
|
|
13
|
-
return (
|
|
14
|
-
<Content>
|
|
15
|
-
<Content component={'p'}>
|
|
16
|
-
Please refer to the{' '}
|
|
17
|
-
<ExternalLink href={getOpenShiftNetworkingDocsLink()}>
|
|
18
|
-
OpenShift networking documentation
|
|
19
|
-
</ExternalLink>{' '}
|
|
20
|
-
to configure your cluster's networking, including:{' '}
|
|
21
|
-
</Content>
|
|
22
|
-
<List>
|
|
23
|
-
<ListItem>DHCP or static IP Addresses</ListItem>
|
|
24
|
-
{shouldDisplayLoadBalancersBullet && <ListItem>Load balancers</ListItem>}
|
|
25
|
-
<ListItem>Network ports</ListItem>
|
|
26
|
-
<ListItem>DNS</ListItem>
|
|
27
|
-
</List>
|
|
28
|
-
</Content>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
File without changes
|