@openshift-assisted/ui-lib 2.56.1 → 2.56.2
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/common/config/constants.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/NewClusterWizard.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/clusterWizardContext/ClusterWizardContextProvider.d.ts +1 -1
- package/build/@types/ocm/components/wizard/clusterWizardContext/ClusterWizardContextProvider.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/clusterWizardContext/utils.d.ts +7 -0
- package/build/@types/ocm/components/wizard/clusterWizardContext/utils.d.ts.map +1 -0
- package/build/@types/ocm/components/wizard/steps/clusterDetails/ClusterDetailsForm.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/disconnected/BasicStep.d.ts +2 -1
- package/build/@types/ocm/components/wizard/steps/disconnected/BasicStep.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/disconnected/DisconnectedReviewStep.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/disconnected/DisconnectedStaticIp.d.ts +4 -0
- package/build/@types/ocm/components/wizard/steps/disconnected/DisconnectedStaticIp.d.ts.map +1 -0
- package/build/@types/ocm/components/wizard/steps/disconnected/InstallDisconnectedSwitch.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/disconnected/OptionalConfigurationsStep.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/disconnected/index.d.ts +1 -0
- package/build/@types/ocm/components/wizard/steps/disconnected/index.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/StaticIp.d.ts +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/StaticIp.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/commonValidationSchemas.d.ts +6 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/commonValidationSchemas.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/disconnectedNetworkWideValidationSchema.d.ts +24 -0
- package/build/@types/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/disconnectedNetworkWideValidationSchema.d.ts.map +1 -0
- package/build/@types/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.d.ts +46 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/components/StaticIpPage.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/data/dataTypes.d.ts +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/data/dataTypes.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/data/disconnectedNetworkWide.d.ts +8 -0
- package/build/@types/ocm/components/wizard/steps/staticIp/data/disconnectedNetworkWide.d.ts.map +1 -0
- package/build/@types/ocm/components/wizard/steps/staticIp/data/formDataFromInfraEnvField.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/data/fromInfraEnv.d.ts +2 -0
- package/build/@types/ocm/components/wizard/steps/staticIp/data/fromInfraEnv.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/data/index.d.ts +1 -0
- package/build/@types/ocm/components/wizard/steps/staticIp/data/index.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/data/nmstateYaml.d.ts +1 -0
- package/build/@types/ocm/components/wizard/steps/staticIp/data/nmstateYaml.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/steps/staticIp/data/protocolVersion.d.ts +2 -2
- package/build/@types/ocm/components/wizard/steps/staticIp/data/protocolVersion.d.ts.map +1 -1
- package/build/@types/ocm/components/wizard/wizardComponents/ClusterWizardNavigation.d.ts +7 -0
- package/build/@types/ocm/components/wizard/wizardComponents/ClusterWizardNavigation.d.ts.map +1 -1
- package/build/cjs/common/components/clusterWizard/ClusterWizardStep.css +9 -0
- package/build/cjs/common/config/constants.js +1 -0
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/validationSchemas/addressValidation.js +2 -2
- package/build/cjs/common/validationSchemas/addressValidation.js.map +1 -1
- package/build/cjs/ocm/components/wizard/NewClusterWizard.js +4 -0
- package/build/cjs/ocm/components/wizard/NewClusterWizard.js.map +1 -1
- package/build/cjs/ocm/components/wizard/clusterWizardContext/ClusterWizardContextProvider.js +62 -62
- package/build/cjs/ocm/components/wizard/clusterWizardContext/ClusterWizardContextProvider.js.map +1 -1
- package/build/cjs/ocm/components/wizard/clusterWizardContext/utils.js +61 -0
- package/build/cjs/ocm/components/wizard/clusterWizardContext/utils.js.map +1 -0
- package/build/cjs/ocm/components/wizard/steps/clusterDetails/ClusterDetailsForm.js +1 -2
- package/build/cjs/ocm/components/wizard/steps/clusterDetails/ClusterDetailsForm.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/disconnected/BasicStep.js +95 -7
- package/build/cjs/ocm/components/wizard/steps/disconnected/BasicStep.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/disconnected/DisconnectedReviewStep.js +20 -9
- package/build/cjs/ocm/components/wizard/steps/disconnected/DisconnectedReviewStep.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/disconnected/DisconnectedStaticIp.js +26 -0
- package/build/cjs/ocm/components/wizard/steps/disconnected/DisconnectedStaticIp.js.map +1 -0
- package/build/cjs/ocm/components/wizard/steps/disconnected/InstallDisconnectedSwitch.js +1 -1
- package/build/cjs/ocm/components/wizard/steps/disconnected/InstallDisconnectedSwitch.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/disconnected/OptionalConfigurationsStep.js +87 -56
- package/build/cjs/ocm/components/wizard/steps/disconnected/OptionalConfigurationsStep.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/disconnected/index.js +1 -0
- package/build/cjs/ocm/components/wizard/steps/disconnected/index.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/StaticIp.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/commonValidationSchemas.js +49 -12
- package/build/cjs/ocm/components/wizard/steps/staticIp/commonValidationSchemas.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.js +13 -4
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.js +96 -4
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/disconnectedNetworkWideValidationSchema.js +70 -0
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/disconnectedNetworkWideValidationSchema.js.map +1 -0
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.js +19 -9
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/StaticIpPage.js +8 -2
- package/build/cjs/ocm/components/wizard/steps/staticIp/components/StaticIpPage.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/disconnectedNetworkWide.js +55 -0
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/disconnectedNetworkWide.js.map +1 -0
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/formDataFromInfraEnvField.js +5 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/formDataFromInfraEnvField.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/fromInfraEnv.js +48 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/fromInfraEnv.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/index.js +1 -0
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/index.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/nmstateYaml.js +12 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/nmstateYaml.js.map +1 -1
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/protocolVersion.js +9 -7
- package/build/cjs/ocm/components/wizard/steps/staticIp/data/protocolVersion.js.map +1 -1
- package/build/cjs/ocm/components/wizard/wizardComponents/ClusterWizardNavigation.js +31 -20
- package/build/cjs/ocm/components/wizard/wizardComponents/ClusterWizardNavigation.js.map +1 -1
- package/lib/common/components/clusterWizard/ClusterWizardStep.css +9 -0
- package/lib/common/config/constants.ts +1 -0
- package/lib/common/validationSchemas/_validationSchemas.test.ts +1 -1
- package/lib/common/validationSchemas/addressValidation.tsx +2 -2
- package/lib/ocm/components/wizard/NewClusterWizard.tsx +5 -0
- package/lib/ocm/components/wizard/clusterWizardContext/ClusterWizardContextProvider.tsx +63 -85
- package/lib/ocm/components/wizard/clusterWizardContext/utils.ts +73 -0
- package/lib/ocm/components/wizard/steps/clusterDetails/ClusterDetailsForm.tsx +0 -2
- package/lib/ocm/components/wizard/steps/disconnected/BasicStep.tsx +147 -7
- package/lib/ocm/components/wizard/steps/disconnected/DisconnectedReviewStep.tsx +44 -13
- package/lib/ocm/components/wizard/steps/disconnected/DisconnectedStaticIp.tsx +29 -0
- package/lib/ocm/components/wizard/steps/disconnected/InstallDisconnectedSwitch.tsx +1 -0
- package/lib/ocm/components/wizard/steps/disconnected/OptionalConfigurationsStep.tsx +137 -69
- package/lib/ocm/components/wizard/steps/disconnected/index.tsx +1 -0
- package/lib/ocm/components/wizard/steps/staticIp/StaticIp.tsx +1 -1
- package/lib/ocm/components/wizard/steps/staticIp/commonValidationSchemas.tsx +42 -3
- package/lib/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/FormViewNetworkWide.tsx +15 -4
- package/lib/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.tsx +232 -14
- package/lib/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/disconnectedNetworkWideValidationSchema.tsx +98 -0
- package/lib/ocm/components/wizard/steps/staticIp/components/FormViewNetworkWide/formViewNetworkWideValidationSchema.tsx +14 -5
- package/lib/ocm/components/wizard/steps/staticIp/components/StaticIpPage.tsx +8 -3
- package/lib/ocm/components/wizard/steps/staticIp/data/dataTypes.ts +1 -1
- package/lib/ocm/components/wizard/steps/staticIp/data/disconnectedNetworkWide.ts +81 -0
- package/lib/ocm/components/wizard/steps/staticIp/data/formDataFromInfraEnvField.ts +6 -2
- package/lib/ocm/components/wizard/steps/staticIp/data/fromInfraEnv.ts +57 -2
- package/lib/ocm/components/wizard/steps/staticIp/data/index.tsx +1 -0
- package/lib/ocm/components/wizard/steps/staticIp/data/nmstateYaml.ts +16 -0
- package/lib/ocm/components/wizard/steps/staticIp/data/protocolVersion.ts +9 -7
- package/lib/ocm/components/wizard/utils/_wizardTransition.test.ts +60 -1
- package/lib/ocm/components/wizard/wizardComponents/ClusterWizardNavigation.tsx +39 -16
- package/package.json +3 -3
|
@@ -37,6 +37,19 @@ export const getProtocolVersionIdx = (protocolVersion: ProtocolVersion): number
|
|
|
37
37
|
return protocolVersion === ProtocolVersion.ipv4 ? 0 : 1;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
export const getRouteGateway = (
|
|
41
|
+
routesConfig: NmstateRoutesConfig[],
|
|
42
|
+
protocolVersion: ProtocolVersion,
|
|
43
|
+
): string => {
|
|
44
|
+
const route = routesConfig.find(
|
|
45
|
+
(config) => config.destination === ROUTE_DESTINATIONS[protocolVersion],
|
|
46
|
+
);
|
|
47
|
+
if (!route) {
|
|
48
|
+
return '';
|
|
49
|
+
}
|
|
50
|
+
return route['next-hop-address'];
|
|
51
|
+
};
|
|
52
|
+
|
|
40
53
|
export const yamlToNmstateObject = (yaml: string): Nmstate => {
|
|
41
54
|
return load(yaml) as Nmstate;
|
|
42
55
|
};
|
|
@@ -74,6 +87,9 @@ export const getProtocolType = (comments: string[]): StaticProtocolType | null =
|
|
|
74
87
|
if (machineNetworks[ProtocolVersion.ipv4]) {
|
|
75
88
|
return 'ipv4';
|
|
76
89
|
}
|
|
90
|
+
if (machineNetworks[ProtocolVersion.ipv6]) {
|
|
91
|
+
return 'ipv6';
|
|
92
|
+
}
|
|
77
93
|
return null;
|
|
78
94
|
};
|
|
79
95
|
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { Address4, Address6 } from 'ip-address';
|
|
2
2
|
import { ProtocolVersion, StaticProtocolType } from './dataTypes';
|
|
3
3
|
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
4
|
export const showIpv4 = (protocolType: StaticProtocolType) => {
|
|
6
|
-
|
|
7
|
-
return true;
|
|
5
|
+
return protocolType !== 'ipv6';
|
|
8
6
|
};
|
|
9
7
|
|
|
10
8
|
export const showIpv6 = (protocolType: StaticProtocolType) => {
|
|
11
|
-
return protocolType
|
|
9
|
+
return protocolType !== 'ipv4';
|
|
12
10
|
};
|
|
13
11
|
|
|
14
12
|
export const showProtocolVersion = (
|
|
@@ -22,9 +20,13 @@ export const showProtocolVersion = (
|
|
|
22
20
|
};
|
|
23
21
|
|
|
24
22
|
export const getShownProtocolVersions = (protocolType: StaticProtocolType): ProtocolVersion[] => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
if (protocolType === 'dualStack') {
|
|
24
|
+
return [ProtocolVersion.ipv4, ProtocolVersion.ipv6];
|
|
25
|
+
}
|
|
26
|
+
if (protocolType === 'ipv6') {
|
|
27
|
+
return [ProtocolVersion.ipv6];
|
|
28
|
+
}
|
|
29
|
+
return [ProtocolVersion.ipv4];
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
export const getProtocolVersionLabel = (protocolVersion: ProtocolVersion) =>
|
|
@@ -8,7 +8,15 @@ import {
|
|
|
8
8
|
Validation as HostValidation,
|
|
9
9
|
} from '../../../../common/types/hosts';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
canNextClusterDetails,
|
|
13
|
+
canNextHostDiscovery,
|
|
14
|
+
canNextStorage,
|
|
15
|
+
disconnectedSteps,
|
|
16
|
+
} from './wizardTransition';
|
|
17
|
+
import { getWizardNavEntries } from '../wizardComponents/ClusterWizardNavigation';
|
|
18
|
+
import { getDisconnectedWizardStepIds } from '../clusterWizardContext/utils';
|
|
19
|
+
import { StaticIpView } from '../steps/staticIp/data';
|
|
12
20
|
|
|
13
21
|
const clusterBase: Cluster = {
|
|
14
22
|
kind: 'Cluster',
|
|
@@ -440,3 +448,54 @@ describe('OCM wizard transition of Storage', () => {
|
|
|
440
448
|
expect(canNextStorage({ cluster })).toBe(true);
|
|
441
449
|
});
|
|
442
450
|
});
|
|
451
|
+
|
|
452
|
+
describe('Disconnected wizard step ids', () => {
|
|
453
|
+
test('starts with the three base disconnected steps', () => {
|
|
454
|
+
expect(getDisconnectedWizardStepIds()).toEqual(disconnectedSteps);
|
|
455
|
+
expect(getDisconnectedWizardStepIds('dhcp-selected')).toEqual(disconnectedSteps);
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
test('inserts static IP form steps and removes them again for DHCP', () => {
|
|
459
|
+
const withStatic = getDisconnectedWizardStepIds(StaticIpView.FORM);
|
|
460
|
+
expect(withStatic).toEqual([
|
|
461
|
+
'disconnected-basic',
|
|
462
|
+
'static-ip-network-wide-configurations',
|
|
463
|
+
'static-ip-host-configurations',
|
|
464
|
+
'disconnected-optional-configurations',
|
|
465
|
+
'disconnected-review',
|
|
466
|
+
]);
|
|
467
|
+
expect(getDisconnectedWizardStepIds('dhcp-selected')).toEqual(disconnectedSteps);
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
test('inserts the YAML static IP step', () => {
|
|
471
|
+
expect(getDisconnectedWizardStepIds(StaticIpView.YAML)).toEqual([
|
|
472
|
+
'disconnected-basic',
|
|
473
|
+
'static-ip-yaml-view',
|
|
474
|
+
'disconnected-optional-configurations',
|
|
475
|
+
'disconnected-review',
|
|
476
|
+
]);
|
|
477
|
+
});
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
describe('Wizard nav visual numbers', () => {
|
|
481
|
+
test('numbers review as 3 when static IP steps are absent', () => {
|
|
482
|
+
const entries = getWizardNavEntries(disconnectedSteps);
|
|
483
|
+
expect(entries.map((entry) => [entry.stepId, entry.visualNumber])).toEqual([
|
|
484
|
+
['disconnected-basic', 1],
|
|
485
|
+
['disconnected-optional-configurations', 2],
|
|
486
|
+
['disconnected-review', 3],
|
|
487
|
+
]);
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
test('keeps a single number for form-view static IP and numbers review as 4', () => {
|
|
491
|
+
const entries = getWizardNavEntries(getDisconnectedWizardStepIds(StaticIpView.FORM));
|
|
492
|
+
expect(
|
|
493
|
+
entries.map((entry) => [entry.stepId, entry.visualNumber, entry.isStaticIpFormGroup]),
|
|
494
|
+
).toEqual([
|
|
495
|
+
['disconnected-basic', 1, false],
|
|
496
|
+
['static-ip-network-wide-configurations', 2, true],
|
|
497
|
+
['disconnected-optional-configurations', 3, false],
|
|
498
|
+
['disconnected-review', 4, false],
|
|
499
|
+
]);
|
|
500
|
+
});
|
|
501
|
+
});
|
|
@@ -8,6 +8,30 @@ import {
|
|
|
8
8
|
ClusterWizardStepsType,
|
|
9
9
|
isStaticIpStep,
|
|
10
10
|
} from '../utils/wizardTransition';
|
|
11
|
+
|
|
12
|
+
export type WizardNavEntry = {
|
|
13
|
+
stepId: ClusterWizardStepsType;
|
|
14
|
+
visualNumber: number;
|
|
15
|
+
isStaticIpFormGroup: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const getWizardNavEntries = (wizardStepIds: ClusterWizardStepsType[]): WizardNavEntry[] => {
|
|
19
|
+
const entries: WizardNavEntry[] = [];
|
|
20
|
+
let i = 0;
|
|
21
|
+
let visualNumber = 1;
|
|
22
|
+
while (i < wizardStepIds.length) {
|
|
23
|
+
const stepId = wizardStepIds[i];
|
|
24
|
+
if (stepId === 'static-ip-network-wide-configurations') {
|
|
25
|
+
entries.push({ stepId, visualNumber, isStaticIpFormGroup: true });
|
|
26
|
+
i += 2;
|
|
27
|
+
} else {
|
|
28
|
+
entries.push({ stepId, visualNumber, isStaticIpFormGroup: false });
|
|
29
|
+
i += 1;
|
|
30
|
+
}
|
|
31
|
+
visualNumber += 1;
|
|
32
|
+
}
|
|
33
|
+
return entries;
|
|
34
|
+
};
|
|
11
35
|
import { useClusterWizardContext } from '../clusterWizardContext/ClusterWizardContext';
|
|
12
36
|
import { staticIpFormViewSubSteps, wizardStepNames } from '../constants';
|
|
13
37
|
import WizardNavItem from '../../../../common/components/ui/WizardNavItem';
|
|
@@ -48,7 +72,11 @@ export const ClusterWizardNavigation = ({ cluster }: { cluster?: Cluster }) => {
|
|
|
48
72
|
return stepId === 'cluster-details' ? false : isStepIdxAfterCurrent(idx);
|
|
49
73
|
};
|
|
50
74
|
|
|
51
|
-
const getNavItem = (
|
|
75
|
+
const getNavItem = (
|
|
76
|
+
idx: number,
|
|
77
|
+
stepId: ClusterWizardStepsType,
|
|
78
|
+
visualNumber: number,
|
|
79
|
+
): ReactNode => {
|
|
52
80
|
return (
|
|
53
81
|
<WizardNavItem
|
|
54
82
|
stepIndex={idx}
|
|
@@ -60,11 +88,12 @@ export const ClusterWizardNavigation = ({ cluster }: { cluster?: Cluster }) => {
|
|
|
60
88
|
isDisabled={isStepDisabled(idx, stepId)}
|
|
61
89
|
isValid={() => isStepValid(stepId, cluster)}
|
|
62
90
|
data-testid={`cluster-wizard-nav-item-${stepId}`}
|
|
91
|
+
style={{ '--cluster-wizard-step-number': `"${visualNumber}"` } as React.CSSProperties}
|
|
63
92
|
/>
|
|
64
93
|
);
|
|
65
94
|
};
|
|
66
95
|
|
|
67
|
-
const getStaticIpFormViewNavItem = (idx: number): ReactNode => {
|
|
96
|
+
const getStaticIpFormViewNavItem = (idx: number, visualNumber: number): ReactNode => {
|
|
68
97
|
return (
|
|
69
98
|
<WizardNavItem
|
|
70
99
|
stepIndex={idx}
|
|
@@ -74,13 +103,14 @@ export const ClusterWizardNavigation = ({ cluster }: { cluster?: Cluster }) => {
|
|
|
74
103
|
isCurrent={isStaticIpStep(clusterWizardContext.currentStepId)}
|
|
75
104
|
isDisabled={isStepIdxAfterCurrent(idx)}
|
|
76
105
|
data-testid={`cluster-wizard-nav-item-static-network-configuration-form-view`}
|
|
106
|
+
style={{ '--cluster-wizard-step-number': `"${visualNumber}"` } as React.CSSProperties}
|
|
77
107
|
>
|
|
78
108
|
<WizardNav
|
|
79
109
|
isInnerList
|
|
80
110
|
data-testid="cluster-wizard-nav-item-static-network-configuration-form-view-inner-list"
|
|
81
111
|
>
|
|
82
112
|
{staticIpFormViewSubSteps.map((stepId, subIdx) => {
|
|
83
|
-
return getNavItem(idx + subIdx, stepId);
|
|
113
|
+
return getNavItem(idx + subIdx, stepId, visualNumber);
|
|
84
114
|
})}
|
|
85
115
|
</WizardNav>
|
|
86
116
|
</WizardNavItem>
|
|
@@ -88,20 +118,13 @@ export const ClusterWizardNavigation = ({ cluster }: { cluster?: Cluster }) => {
|
|
|
88
118
|
};
|
|
89
119
|
|
|
90
120
|
const getWizardNavItems = (): ReactNode[] => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (stepId !== 'static-ip-network-wide-configurations') {
|
|
96
|
-
navItems.push(getNavItem(i, stepId));
|
|
97
|
-
i += 1;
|
|
98
|
-
} else {
|
|
99
|
-
navItems.push(getStaticIpFormViewNavItem(i));
|
|
100
|
-
//skip iteration on form view sub steps
|
|
101
|
-
i += 2;
|
|
121
|
+
return getWizardNavEntries(clusterWizardContext.wizardStepIds).map((entry) => {
|
|
122
|
+
const idx = clusterWizardContext.wizardStepIds.indexOf(entry.stepId);
|
|
123
|
+
if (entry.isStaticIpFormGroup) {
|
|
124
|
+
return getStaticIpFormViewNavItem(idx, entry.visualNumber);
|
|
102
125
|
}
|
|
103
|
-
|
|
104
|
-
|
|
126
|
+
return getNavItem(idx, entry.stepId, entry.visualNumber);
|
|
127
|
+
});
|
|
105
128
|
};
|
|
106
129
|
|
|
107
130
|
return <WizardNav data-testid="cluster-wizard-nav">{getWizardNavItems()}</WizardNav>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@openshift-assisted/locales": "2.56.
|
|
4
|
-
"@openshift-assisted/types": "2.56.
|
|
3
|
+
"@openshift-assisted/locales": "2.56.2",
|
|
4
|
+
"@openshift-assisted/types": "2.56.2",
|
|
5
5
|
"@openshift-console/dynamic-plugin-sdk": "^4.22.0",
|
|
6
6
|
"@patternfly/patternfly": "6.4.0",
|
|
7
7
|
"@patternfly/react-code-editor": "6.4.1",
|
|
@@ -136,5 +136,5 @@
|
|
|
136
136
|
]
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
-
"version": "2.56.
|
|
139
|
+
"version": "2.56.2"
|
|
140
140
|
}
|