@openshift-assisted/ui-lib 2.55.1 → 2.55.3
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/docs_links.d.ts +1 -0
- package/build/@types/common/config/docs_links.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContextProvider.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardNavigation.d.ts +7 -0
- package/build/@types/ocm/components/clusterWizard/ClusterWizardNavigation.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/NewClusterWizard.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/StaticIp.d.ts +1 -1
- package/build/@types/ocm/components/clusterWizard/StaticIp.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/disconnected/BasicStep.d.ts +1 -1
- package/build/@types/ocm/components/clusterWizard/disconnected/BasicStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.d.ts +4 -0
- package/build/@types/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.d.ts.map +1 -0
- package/build/@types/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/disconnected/ReviewStep.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/utils.d.ts +7 -0
- package/build/@types/ocm/components/clusterWizard/utils.d.ts.map +1 -0
- package/build/@types/ocm/components/clusters/AssistedInstallerHeader.d.ts.map +1 -1
- package/build/cjs/common/components/clusterWizard/ClusterWizardStep.css +9 -0
- package/build/cjs/common/config/docs_links.js +3 -1
- package/build/cjs/common/config/docs_links.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/clusterConfiguration/staticIp/components/StaticIpPage.js +3 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js +47 -47
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardNavigation.js +31 -19
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardNavigation.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js +5 -0
- package/build/cjs/ocm/components/clusterWizard/NewClusterWizard.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/StaticIp.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/BasicStep.js +1 -2
- package/build/cjs/ocm/components/clusterWizard/disconnected/BasicStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.js +26 -0
- package/build/cjs/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.js.map +1 -0
- package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js +52 -19
- package/build/cjs/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js +46 -48
- package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/utils.js +63 -0
- package/build/cjs/ocm/components/clusterWizard/utils.js.map +1 -0
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js +0 -3
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js.map +1 -1
- package/lib/common/components/clusterWizard/ClusterWizardStep.css +9 -0
- package/lib/common/config/docs_links.ts +3 -0
- package/lib/common/validationSchemas/_validationSchemas.test.ts +1 -1
- package/lib/common/validationSchemas/addressValidation.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/staticIp/components/StaticIpPage.tsx +4 -1
- package/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +48 -71
- package/lib/ocm/components/clusterWizard/ClusterWizardNavigation.tsx +39 -16
- package/lib/ocm/components/clusterWizard/NewClusterWizard.tsx +5 -0
- package/lib/ocm/components/clusterWizard/StaticIp.tsx +1 -1
- package/lib/ocm/components/clusterWizard/_wizardTransition.test.ts +60 -1
- package/lib/ocm/components/clusterWizard/disconnected/BasicStep.tsx +2 -3
- package/lib/ocm/components/clusterWizard/disconnected/DisconnectedStaticIp.tsx +29 -0
- package/lib/ocm/components/clusterWizard/disconnected/OptionalConfigurationsStep.tsx +72 -12
- package/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx +84 -89
- package/lib/ocm/components/clusterWizard/utils.ts +75 -0
- package/lib/ocm/components/clusters/AssistedInstallerHeader.tsx +1 -9
- package/package.json +3 -3
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
ClusterWizardStep,
|
|
6
|
-
TechnologyPreview,
|
|
7
|
-
PULL_SECRET_INFO_LINK,
|
|
8
|
-
singleClusterOperators,
|
|
9
|
-
} from '../../../../common';
|
|
10
|
-
import ClusterWizardNavigation from '../ClusterWizardNavigation';
|
|
11
|
-
import { WithErrorBoundary } from '../../../../common/components/ErrorHandling/WithErrorBoundary';
|
|
2
|
+
import { saveAs } from 'file-saver';
|
|
3
|
+
import { useNavigate } from 'react-router';
|
|
12
4
|
import {
|
|
13
|
-
Split,
|
|
14
|
-
SplitItem,
|
|
15
5
|
Alert,
|
|
16
6
|
Grid,
|
|
17
7
|
DescriptionList,
|
|
@@ -24,12 +14,20 @@ import {
|
|
|
24
14
|
OrderType,
|
|
25
15
|
Content,
|
|
26
16
|
} from '@patternfly/react-core';
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
import {
|
|
18
|
+
ClusterWizardStep,
|
|
19
|
+
ExternalLink,
|
|
20
|
+
getDisconnectedDocsLink,
|
|
21
|
+
getMajorMinorVersion,
|
|
22
|
+
PULL_SECRET_INFO_LINK,
|
|
23
|
+
singleClusterOperators,
|
|
24
|
+
} from '../../../../common';
|
|
25
|
+
import { WithErrorBoundary } from '../../../../common/components/ErrorHandling/WithErrorBoundary';
|
|
31
26
|
import { getOperatorSpecs } from '../../../../common/components/operators/operatorSpecs';
|
|
27
|
+
import { useClusterWizardContext } from '../ClusterWizardContext';
|
|
32
28
|
import { DISCONNECTED_OPENSHIFT_VERSION } from './BasicStep';
|
|
29
|
+
import ClusterWizardFooter from '../ClusterWizardFooter';
|
|
30
|
+
import ClusterWizardNavigation from '../ClusterWizardNavigation';
|
|
33
31
|
|
|
34
32
|
const ReviewStep = () => {
|
|
35
33
|
const { moveBack, disconnectedInfraEnv } = useClusterWizardContext();
|
|
@@ -37,84 +35,81 @@ const ReviewStep = () => {
|
|
|
37
35
|
const navigate = useNavigate();
|
|
38
36
|
|
|
39
37
|
return (
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
<ClusterWizardStep
|
|
39
|
+
navigation={<ClusterWizardNavigation />}
|
|
40
|
+
footer={
|
|
41
|
+
<ClusterWizardFooter
|
|
42
|
+
onNext={() => {
|
|
43
|
+
saveAs(disconnectedInfraEnv?.downloadUrl ?? '');
|
|
44
|
+
void navigate('/cluster-list');
|
|
45
|
+
}}
|
|
46
|
+
onBack={moveBack}
|
|
47
|
+
nextButtonText="Download ISO"
|
|
48
|
+
/>
|
|
49
|
+
}
|
|
45
50
|
>
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</
|
|
85
|
-
</
|
|
86
|
-
|
|
87
|
-
<List>
|
|
88
|
-
{singleClusterOperators.map((o) => {
|
|
89
|
-
const operator = Object.values(opSpecs)
|
|
90
|
-
.flatMap((op) => op)
|
|
91
|
-
.find((op) => op.operatorKey === o);
|
|
92
|
-
return <ListItem key={o}>{operator ? operator.title : o}</ListItem>;
|
|
93
|
-
})}
|
|
94
|
-
</List>
|
|
95
|
-
</Alert>
|
|
96
|
-
<DescriptionList isHorizontal>
|
|
51
|
+
<WithErrorBoundary title="Failed to load Review step">
|
|
52
|
+
<Grid hasGutter>
|
|
53
|
+
<Content component="h2">Review and download ISO</Content>
|
|
54
|
+
<Alert isInline variant="info" title="ISO boot instructions">
|
|
55
|
+
<List component={ListComponent.ol} type={OrderType.number}>
|
|
56
|
+
<ListItem>Download the ISO.</ListItem>
|
|
57
|
+
<ListItem>
|
|
58
|
+
Boot your cluster's machines from this ISO and{' '}
|
|
59
|
+
<ExternalLink
|
|
60
|
+
href={getDisconnectedDocsLink(
|
|
61
|
+
getMajorMinorVersion(DISCONNECTED_OPENSHIFT_VERSION),
|
|
62
|
+
)}
|
|
63
|
+
>
|
|
64
|
+
follow instructions
|
|
65
|
+
</ExternalLink>
|
|
66
|
+
.
|
|
67
|
+
</ListItem>
|
|
68
|
+
<ListItem>
|
|
69
|
+
Your <ExternalLink href={PULL_SECRET_INFO_LINK}>pull secret</ExternalLink> was
|
|
70
|
+
included automatically. You can change it inside the installation wizard.
|
|
71
|
+
</ListItem>
|
|
72
|
+
</List>
|
|
73
|
+
</Alert>
|
|
74
|
+
<Alert isInline isExpandable variant="info" title="List of available operators">
|
|
75
|
+
<List>
|
|
76
|
+
{singleClusterOperators.map((o) => {
|
|
77
|
+
const operator = Object.values(opSpecs)
|
|
78
|
+
.flatMap((op) => op)
|
|
79
|
+
.find((op) => op.operatorKey === o);
|
|
80
|
+
return <ListItem key={o}>{operator ? operator.title : o}</ListItem>;
|
|
81
|
+
})}
|
|
82
|
+
</List>
|
|
83
|
+
</Alert>
|
|
84
|
+
<DescriptionList isHorizontal>
|
|
85
|
+
<DescriptionListGroup>
|
|
86
|
+
<DescriptionListTerm>OpenShift version</DescriptionListTerm>
|
|
87
|
+
<DescriptionListDescription>
|
|
88
|
+
{disconnectedInfraEnv?.openshiftVersion ?? DISCONNECTED_OPENSHIFT_VERSION}
|
|
89
|
+
</DescriptionListDescription>
|
|
90
|
+
</DescriptionListGroup>
|
|
91
|
+
{disconnectedInfraEnv?.rendezvousIp && (
|
|
97
92
|
<DescriptionListGroup>
|
|
98
|
-
<DescriptionListTerm>
|
|
93
|
+
<DescriptionListTerm>Rendezvous IP</DescriptionListTerm>
|
|
99
94
|
<DescriptionListDescription>
|
|
100
|
-
{disconnectedInfraEnv
|
|
95
|
+
{disconnectedInfraEnv.rendezvousIp}
|
|
101
96
|
</DescriptionListDescription>
|
|
102
97
|
</DescriptionListGroup>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
</
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
</
|
|
113
|
-
</
|
|
114
|
-
</
|
|
115
|
-
</
|
|
116
|
-
</
|
|
117
|
-
</
|
|
98
|
+
)}
|
|
99
|
+
<DescriptionListGroup>
|
|
100
|
+
<DescriptionListTerm>CPU architecture</DescriptionListTerm>
|
|
101
|
+
<DescriptionListDescription>
|
|
102
|
+
{disconnectedInfraEnv?.cpuArchitecture ?? 'x86_64'}
|
|
103
|
+
</DescriptionListDescription>
|
|
104
|
+
</DescriptionListGroup>
|
|
105
|
+
<DescriptionListGroup>
|
|
106
|
+
<DescriptionListTerm>ISO size</DescriptionListTerm>
|
|
107
|
+
<DescriptionListDescription>approx. 50+GB</DescriptionListDescription>
|
|
108
|
+
</DescriptionListGroup>
|
|
109
|
+
</DescriptionList>
|
|
110
|
+
</Grid>
|
|
111
|
+
</WithErrorBoundary>
|
|
112
|
+
</ClusterWizardStep>
|
|
118
113
|
);
|
|
119
114
|
};
|
|
120
115
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defaultWizardSteps, staticIpFormViewSubSteps } from './constants';
|
|
2
|
+
import { StaticIpView } from '../clusterConfiguration/staticIp/data/dataTypes';
|
|
3
|
+
import { ClusterWizardStepsType, disconnectedSteps } from './wizardTransition';
|
|
4
|
+
|
|
5
|
+
export const addStepToClusterWizard = (
|
|
6
|
+
wizardStepIds: ClusterWizardStepsType[],
|
|
7
|
+
addAfterStep: ClusterWizardStepsType,
|
|
8
|
+
itemsToAdd: ClusterWizardStepsType[],
|
|
9
|
+
): ClusterWizardStepsType[] => {
|
|
10
|
+
const stepsIds = [...wizardStepIds];
|
|
11
|
+
const referencePosition = stepsIds.findIndex((step) => step === addAfterStep);
|
|
12
|
+
const found = wizardStepIds.filter((step) => step === itemsToAdd[0]);
|
|
13
|
+
if (referencePosition !== -1 && found.length === 0) {
|
|
14
|
+
stepsIds.splice(referencePosition + 1, 0, ...itemsToAdd);
|
|
15
|
+
}
|
|
16
|
+
return stepsIds;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const removeStepFromClusterWizard = (
|
|
20
|
+
wizardStepIds: ClusterWizardStepsType[],
|
|
21
|
+
itemToRemove: ClusterWizardStepsType,
|
|
22
|
+
numberItemsToRemove: number,
|
|
23
|
+
): ClusterWizardStepsType[] => {
|
|
24
|
+
const stepsIds = [...wizardStepIds];
|
|
25
|
+
const position = stepsIds.findIndex((step) => step === itemToRemove);
|
|
26
|
+
if (position !== -1) {
|
|
27
|
+
stepsIds.splice(position, numberItemsToRemove);
|
|
28
|
+
}
|
|
29
|
+
return stepsIds;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const getWizardStepIds = (
|
|
33
|
+
wizardStepIds: ClusterWizardStepsType[] | undefined,
|
|
34
|
+
staticIpView?: StaticIpView | 'dhcp-selected',
|
|
35
|
+
isSingleClusterFeatureEnabled?: boolean,
|
|
36
|
+
): ClusterWizardStepsType[] => {
|
|
37
|
+
let stepsCopy = wizardStepIds ? [...wizardStepIds] : [...defaultWizardSteps];
|
|
38
|
+
if (staticIpView === StaticIpView.YAML) {
|
|
39
|
+
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-network-wide-configurations', 2);
|
|
40
|
+
stepsCopy = addStepToClusterWizard(stepsCopy, 'cluster-details', ['static-ip-yaml-view']);
|
|
41
|
+
} else if (staticIpView === StaticIpView.FORM) {
|
|
42
|
+
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-yaml-view', 1);
|
|
43
|
+
stepsCopy = addStepToClusterWizard(stepsCopy, 'cluster-details', staticIpFormViewSubSteps);
|
|
44
|
+
} else if (staticIpView === 'dhcp-selected') {
|
|
45
|
+
stepsCopy = removeStepFromClusterWizard(stepsCopy, 'static-ip-network-wide-configurations', 2);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (isSingleClusterFeatureEnabled && !stepsCopy.includes('credentials-download')) {
|
|
49
|
+
stepsCopy = addStepToClusterWizard(stepsCopy, 'custom-manifests', ['credentials-download']);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return stepsCopy;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const getDisconnectedWizardStepIds = (
|
|
56
|
+
staticIpView?: StaticIpView | 'dhcp-selected',
|
|
57
|
+
): ClusterWizardStepsType[] => {
|
|
58
|
+
// Always rebuild from the base disconnected steps so toggling static IP / DHCP
|
|
59
|
+
// cannot leave leftover sub-steps in the list.
|
|
60
|
+
const copy = [...disconnectedSteps];
|
|
61
|
+
|
|
62
|
+
if (staticIpView === StaticIpView.YAML) {
|
|
63
|
+
return addStepToClusterWizard(copy, 'disconnected-optional-configurations', [
|
|
64
|
+
'static-ip-yaml-view',
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
if (staticIpView === StaticIpView.FORM) {
|
|
68
|
+
return addStepToClusterWizard(copy, 'disconnected-optional-configurations', [
|
|
69
|
+
'static-ip-network-wide-configurations',
|
|
70
|
+
'static-ip-host-configurations',
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return copy;
|
|
75
|
+
};
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Content, Split, SplitItem } from '@patternfly/react-core';
|
|
3
|
-
import {
|
|
4
|
-
ASSISTED_INSTALLER_DOCUMENTATION_LINK,
|
|
5
|
-
TechnologyPreview,
|
|
6
|
-
ExternalLink,
|
|
7
|
-
isInOcm,
|
|
8
|
-
} from '../../../common';
|
|
9
|
-
import { useFeature } from '../../hooks/use-feature';
|
|
3
|
+
import { ASSISTED_INSTALLER_DOCUMENTATION_LINK, ExternalLink, isInOcm } from '../../../common';
|
|
10
4
|
|
|
11
5
|
type AssistedInstallerHeaderProps = {
|
|
12
6
|
clusterName?: string;
|
|
13
7
|
};
|
|
14
8
|
|
|
15
9
|
export const AssistedInstallerHeader = ({ clusterName }: AssistedInstallerHeaderProps) => {
|
|
16
|
-
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
17
10
|
return (
|
|
18
11
|
<>
|
|
19
12
|
<Content component="h1" className="pf-v6-u-display-inline">
|
|
20
13
|
{clusterName || 'Install OpenShift with the Assisted Installer'}
|
|
21
14
|
</Content>
|
|
22
|
-
{isSingleClusterFeatureEnabled && <TechnologyPreview />}
|
|
23
15
|
<Split hasGutter>
|
|
24
16
|
<SplitItem>
|
|
25
17
|
<ExternalLink href={ASSISTED_INSTALLER_DOCUMENTATION_LINK}>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@openshift-assisted/locales": "2.55.
|
|
4
|
-
"@openshift-assisted/types": "2.55.
|
|
3
|
+
"@openshift-assisted/locales": "2.55.3",
|
|
4
|
+
"@openshift-assisted/types": "2.55.3",
|
|
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.55.
|
|
139
|
+
"version": "2.55.3"
|
|
140
140
|
}
|