@openshift-assisted/ui-lib 2.8.3-cim → 2.8.5-cim
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/cim/components/ClusterDeployment/ClusterDeploymentDetails.d.ts.map +1 -1
- package/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts +6 -1
- package/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
- package/@types/cim/components/ClusterDeployment/helpers.d.ts.map +1 -1
- package/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
- package/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts +2 -0
- package/@types/cim/components/InfraEnv/InfraEnvFormPage.d.ts.map +1 -1
- package/@types/cim/components/helpers/toAssisted.d.ts.map +1 -1
- package/@types/cim/components/helpers/versions.d.ts +1 -0
- package/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
- package/@types/cim/components/modals/CimConfiguration/CimConfigProgressAlert.d.ts.map +1 -1
- package/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts +4 -1
- package/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
- package/@types/common/components/clusterConfiguration/DownloadIso.d.ts +2 -1
- package/@types/common/components/clusterConfiguration/DownloadIso.d.ts.map +1 -1
- package/@types/common/components/clusterConfiguration/OpenShiftVersionSelect.d.ts +2 -0
- package/@types/common/components/clusterConfiguration/OpenShiftVersionSelect.d.ts.map +1 -1
- package/@types/common/components/clusterWizard/ReviewValidations.d.ts.map +1 -1
- package/@types/common/components/clusterWizard/types.d.ts +1 -0
- package/@types/common/components/clusterWizard/types.d.ts.map +1 -1
- package/@types/common/components/clusterWizard/validationsInfoUtils.d.ts +4 -0
- package/@types/common/components/clusterWizard/validationsInfoUtils.d.ts.map +1 -1
- package/@types/common/components/ui/formik/types.d.ts +2 -2
- package/@types/common/components/ui/formik/types.d.ts.map +1 -1
- package/@types/common/config/constants.d.ts +1 -1
- package/@types/common/config/constants.d.ts.map +1 -1
- package/@types/ocm/components/ui/OcmFormFields.d.ts +1 -1
- package/@types/ocm/selectors/clusters.d.ts +3 -3
- package/@types/ocm/store/slices/infraEnvs/selectors.d.ts +1 -1
- package/build/build.json +1 -1
- package/build/cim/components/Agent/BMCForm.js +1 -1
- package/build/cim/components/Agent/BMCForm.js.map +1 -1
- package/build/cim/components/ClusterDeployment/ClusterDeploymentDetails.js +59 -56
- package/build/cim/components/ClusterDeployment/ClusterDeploymentDetails.js.map +1 -1
- package/build/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +10 -6
- package/build/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +6 -2
- package/build/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cim/components/ClusterDeployment/helpers.js +4 -2
- package/build/cim/components/ClusterDeployment/helpers.js.map +1 -1
- package/build/cim/components/ClusterDeployment/wizardTransition.js +9 -0
- package/build/cim/components/ClusterDeployment/wizardTransition.js.map +1 -1
- package/build/cim/components/InfraEnv/InfraEnvFormPage.js +3 -3
- package/build/cim/components/InfraEnv/InfraEnvFormPage.js.map +1 -1
- package/build/cim/components/helpers/toAssisted.js +2 -1
- package/build/cim/components/helpers/toAssisted.js.map +1 -1
- package/build/cim/components/helpers/versions.js +1 -0
- package/build/cim/components/helpers/versions.js.map +1 -1
- package/build/cim/components/modals/AddHostModal.js +4 -4
- package/build/cim/components/modals/AddHostModal.js.map +1 -1
- package/build/cim/components/modals/CimConfiguration/CimConfigProgressAlert.js +2 -2
- package/build/cim/components/modals/CimConfiguration/CimConfigProgressAlert.js.map +1 -1
- package/build/cim/components/modals/CimConfiguration/constants.js +1 -1
- package/build/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +5 -5
- package/build/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
- package/build/common/components/clusterConfiguration/DownloadIso.js +2 -2
- package/build/common/components/clusterConfiguration/DownloadIso.js.map +1 -1
- package/build/common/components/clusterConfiguration/OpenShiftVersionSelect.js +2 -2
- package/build/common/components/clusterConfiguration/OpenShiftVersionSelect.js.map +1 -1
- package/build/common/components/clusterWizard/ReviewValidations.js +11 -3
- package/build/common/components/clusterWizard/ReviewValidations.js.map +1 -1
- package/build/common/components/clusterWizard/validationsInfoUtils.js.map +1 -1
- package/build/common/components/ui/formik/SelectField.js +1 -1
- package/build/common/components/ui/formik/SelectField.js.map +1 -1
- package/build/common/config/constants.js +1 -1
- package/build/common/config/constants.js.map +1 -1
- package/lib/cim/components/Agent/BMCForm.tsx +1 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetails.tsx +112 -102
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +17 -5
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +9 -2
- package/lib/cim/components/ClusterDeployment/helpers.ts +13 -10
- package/lib/cim/components/ClusterDeployment/wizardTransition.ts +10 -0
- package/lib/cim/components/InfraEnv/InfraEnvFormPage.tsx +11 -2
- package/lib/cim/components/helpers/toAssisted.ts +3 -0
- package/lib/cim/components/helpers/versions.ts +5 -0
- package/lib/cim/components/modals/AddHostModal.tsx +5 -0
- package/lib/cim/components/modals/CimConfiguration/CimConfigProgressAlert.tsx +4 -2
- package/lib/cim/components/modals/CimConfiguration/constants.ts +1 -1
- package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +6 -4
- package/lib/common/components/clusterConfiguration/DownloadIso.tsx +3 -1
- package/lib/common/components/clusterConfiguration/OpenShiftVersionSelect.tsx +4 -1
- package/lib/common/components/clusterWizard/ReviewValidations.tsx +12 -1
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/clusterWizard/validationsInfoUtils.ts +9 -0
- package/lib/common/components/ui/formik/SelectField.tsx +1 -1
- package/lib/common/components/ui/formik/types.ts +2 -1
- package/lib/common/components/ui/formik/validationSchemas.test.ts +6 -0
- package/lib/common/config/constants.ts +2 -2
- package/package.json +1 -1
|
@@ -80,3 +80,8 @@ export const getMajorMinorVersion = (version = '') => {
|
|
|
80
80
|
const match = /[0-9].[0-9][0-9]?/g.exec(version);
|
|
81
81
|
return match?.[0] || '';
|
|
82
82
|
};
|
|
83
|
+
|
|
84
|
+
export const getNetworkType = (
|
|
85
|
+
ocpVersion: OpenshiftVersionOptionType | undefined,
|
|
86
|
+
): 'OVNKubernetes' | 'OpenShiftSDN' =>
|
|
87
|
+
parseFloat(getMajorMinorVersion(ocpVersion?.version)) >= 4.12 ? 'OVNKubernetes' : 'OpenShiftSDN';
|
|
@@ -74,6 +74,7 @@ const AddHostModal: React.FC<AddHostModalProps> = ({
|
|
|
74
74
|
hasDHCP={hasDHCP}
|
|
75
75
|
isIPXE={isIPXE}
|
|
76
76
|
allowEmpty
|
|
77
|
+
docVersion={docVersion}
|
|
77
78
|
/>
|
|
78
79
|
)}
|
|
79
80
|
{dialogType === 'download' && (
|
|
@@ -90,6 +91,7 @@ const AddHostModal: React.FC<AddHostModalProps> = ({
|
|
|
90
91
|
infraEnv={infraEnv}
|
|
91
92
|
onReset={agentClusterInstall ? () => setDialogType('config') : undefined}
|
|
92
93
|
hasDHCP={hasDHCP}
|
|
94
|
+
docVersion={docVersion}
|
|
93
95
|
/>
|
|
94
96
|
)}
|
|
95
97
|
</>
|
|
@@ -104,11 +106,13 @@ const GeneratingIsoDownload = ({
|
|
|
104
106
|
onClose,
|
|
105
107
|
onReset,
|
|
106
108
|
hasDHCP,
|
|
109
|
+
docVersion,
|
|
107
110
|
}: {
|
|
108
111
|
infraEnv: InfraEnvK8sResource;
|
|
109
112
|
onClose: VoidFunction;
|
|
110
113
|
onReset?: VoidFunction;
|
|
111
114
|
hasDHCP: boolean;
|
|
115
|
+
docVersion: string;
|
|
112
116
|
}) => {
|
|
113
117
|
const { t } = useTranslation();
|
|
114
118
|
return infraEnv.status?.isoDownloadURL ? (
|
|
@@ -117,6 +121,7 @@ const GeneratingIsoDownload = ({
|
|
|
117
121
|
downloadUrl={infraEnv.status.isoDownloadURL}
|
|
118
122
|
onReset={onReset}
|
|
119
123
|
hasDHCP={hasDHCP}
|
|
124
|
+
docVersion={docVersion}
|
|
120
125
|
/>
|
|
121
126
|
) : (
|
|
122
127
|
<EmptyState>
|
|
@@ -84,7 +84,9 @@ export const CimConfigProgressAlert: React.FC<CimConfigProgressAlertProps> = ({
|
|
|
84
84
|
title={t('ai:Configuration may take a few minutes.')}
|
|
85
85
|
actionLinks={actionLinks}
|
|
86
86
|
>
|
|
87
|
-
{t(
|
|
87
|
+
{t(
|
|
88
|
+
'ai:If the configuration is taking longer than 5 minutes, you might need to troubleshoot.',
|
|
89
|
+
)}
|
|
88
90
|
</Alert>
|
|
89
91
|
);
|
|
90
92
|
}
|
|
@@ -103,7 +105,7 @@ export const CimConfigProgressAlert: React.FC<CimConfigProgressAlertProps> = ({
|
|
|
103
105
|
return (
|
|
104
106
|
<Alert
|
|
105
107
|
title={t('ai:Configuration is hanging for a long time.')}
|
|
106
|
-
variant={AlertVariant.
|
|
108
|
+
variant={AlertVariant.info}
|
|
107
109
|
isInline
|
|
108
110
|
actionLinks={actionLinks}
|
|
109
111
|
>
|
|
@@ -23,10 +23,10 @@ import { ProxyFieldsType, StatusErrorType } from '../../types';
|
|
|
23
23
|
import ProxyFields from './ProxyFields';
|
|
24
24
|
import UploadSSH from './UploadSSH';
|
|
25
25
|
import DiscoveryImageTypeControlGroup from './DiscoveryImageTypeControlGroup';
|
|
26
|
-
import {
|
|
26
|
+
import { getOCPStaticIPDocLink } from '../../config/constants';
|
|
27
27
|
import { useTranslation } from '../../hooks/use-translation-wrapper';
|
|
28
28
|
|
|
29
|
-
export const StaticIPInfo:
|
|
29
|
+
export const StaticIPInfo = ({ docVersion }: { docVersion?: string }) => {
|
|
30
30
|
const { t } = useTranslation();
|
|
31
31
|
return (
|
|
32
32
|
<Alert
|
|
@@ -41,7 +41,7 @@ export const StaticIPInfo: React.FC = () => {
|
|
|
41
41
|
icon={<ExternalLinkAltIcon />}
|
|
42
42
|
iconPosition="right"
|
|
43
43
|
isInline
|
|
44
|
-
onClick={() => window.open(
|
|
44
|
+
onClick={() => window.open(getOCPStaticIPDocLink(docVersion), '_blank', 'noopener')}
|
|
45
45
|
>
|
|
46
46
|
{t('ai:View documentation')}
|
|
47
47
|
</Button>
|
|
@@ -73,6 +73,7 @@ type DiscoveryImageConfigFormProps = Proxy & {
|
|
|
73
73
|
imageType?: ImageType;
|
|
74
74
|
isIPXE?: boolean;
|
|
75
75
|
allowEmpty?: boolean;
|
|
76
|
+
docVersion: string;
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
export const DiscoveryImageConfigForm: React.FC<DiscoveryImageConfigFormProps> = ({
|
|
@@ -87,6 +88,7 @@ export const DiscoveryImageConfigForm: React.FC<DiscoveryImageConfigFormProps> =
|
|
|
87
88
|
hasDHCP,
|
|
88
89
|
isIPXE,
|
|
89
90
|
allowEmpty,
|
|
91
|
+
docVersion,
|
|
90
92
|
}) => {
|
|
91
93
|
const initialValues: DiscoveryImageFormValues = {
|
|
92
94
|
sshPublicKey: sshPublicKey || '',
|
|
@@ -123,7 +125,7 @@ export const DiscoveryImageConfigForm: React.FC<DiscoveryImageConfigFormProps> =
|
|
|
123
125
|
</StackItem>
|
|
124
126
|
{hasDHCP === false && (
|
|
125
127
|
<StackItem>
|
|
126
|
-
<StaticIPInfo />
|
|
128
|
+
<StaticIPInfo docVersion={docVersion} />
|
|
127
129
|
</StackItem>
|
|
128
130
|
)}
|
|
129
131
|
<StackItem>
|
|
@@ -23,6 +23,7 @@ export type DownloadISOProps = {
|
|
|
23
23
|
downloadUrl?: string;
|
|
24
24
|
onClose: () => void;
|
|
25
25
|
onReset?: () => void;
|
|
26
|
+
docVersion?: string;
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
const DownloadIso = ({
|
|
@@ -32,6 +33,7 @@ const DownloadIso = ({
|
|
|
32
33
|
onReset,
|
|
33
34
|
hasDHCP,
|
|
34
35
|
isSNO = false,
|
|
36
|
+
docVersion,
|
|
35
37
|
}: DownloadISOProps) => {
|
|
36
38
|
const wgetCommand = `wget -O ${fileName} '${downloadUrl || ''}'`;
|
|
37
39
|
const { t } = useTranslation();
|
|
@@ -53,7 +55,7 @@ const DownloadIso = ({
|
|
|
53
55
|
</StackItem>
|
|
54
56
|
{hasDHCP === false && (
|
|
55
57
|
<StackItem>
|
|
56
|
-
<StaticIPInfo />
|
|
58
|
+
<StaticIPInfo docVersion={docVersion} />
|
|
57
59
|
</StackItem>
|
|
58
60
|
)}
|
|
59
61
|
<StackItem>
|
|
@@ -12,6 +12,7 @@ import { OPENSHIFT_LIFE_CYCLE_DATES_LINK } from '../../config';
|
|
|
12
12
|
import { OpenshiftVersionOptionType } from '../../types';
|
|
13
13
|
import { SelectField } from '../ui';
|
|
14
14
|
import { useTranslation } from '../../hooks/use-translation-wrapper';
|
|
15
|
+
import { SelectFieldProps } from '../ui/formik/types';
|
|
15
16
|
|
|
16
17
|
const OpenShiftLifeCycleDatesLink = () => {
|
|
17
18
|
const { t } = useTranslation();
|
|
@@ -54,8 +55,9 @@ const getOpenshiftVersionHelperText =
|
|
|
54
55
|
|
|
55
56
|
type OpenShiftVersionSelectProps = {
|
|
56
57
|
versions: OpenshiftVersionOptionType[];
|
|
58
|
+
onChange?: SelectFieldProps['onChange'];
|
|
57
59
|
};
|
|
58
|
-
const OpenShiftVersionSelect: React.FC<OpenShiftVersionSelectProps> = ({ versions }) => {
|
|
60
|
+
const OpenShiftVersionSelect: React.FC<OpenShiftVersionSelectProps> = ({ versions, onChange }) => {
|
|
59
61
|
const selectOptions = React.useMemo(
|
|
60
62
|
() =>
|
|
61
63
|
versions
|
|
@@ -75,6 +77,7 @@ const OpenShiftVersionSelect: React.FC<OpenShiftVersionSelectProps> = ({ version
|
|
|
75
77
|
getHelperText={getOpenshiftVersionHelperText(versions)}
|
|
76
78
|
isDisabled={versions.length === 0}
|
|
77
79
|
isRequired
|
|
80
|
+
onChange={onChange}
|
|
78
81
|
/>
|
|
79
82
|
);
|
|
80
83
|
};
|
|
@@ -65,6 +65,7 @@ const FailingValidation = <S extends string>({
|
|
|
65
65
|
setCurrentStepId,
|
|
66
66
|
wizardStepNames,
|
|
67
67
|
wizardStepsValidationsMap,
|
|
68
|
+
host,
|
|
68
69
|
}: FailingValidationsProps<S>) => {
|
|
69
70
|
const { t } = useTranslation();
|
|
70
71
|
|
|
@@ -85,7 +86,16 @@ const FailingValidation = <S extends string>({
|
|
|
85
86
|
// no sooner step, so the user can not do anything about it ...
|
|
86
87
|
fix = t('ai:Please wait till all checks are finished.');
|
|
87
88
|
} else if (step) {
|
|
88
|
-
|
|
89
|
+
const pageURL = host
|
|
90
|
+
? wizardStepsValidationsMap[step].getPageURL?.(host, validation.id)
|
|
91
|
+
: undefined;
|
|
92
|
+
fix = pageURL ? (
|
|
93
|
+
<>
|
|
94
|
+
<Trans t={t}>
|
|
95
|
+
ai:It can be fixed in the <a href={pageURL.url}>{pageURL.name}</a> page.
|
|
96
|
+
</Trans>
|
|
97
|
+
</>
|
|
98
|
+
) : (
|
|
89
99
|
<>
|
|
90
100
|
<Trans t={t}>
|
|
91
101
|
ai:It can be fixed in the{' '}
|
|
@@ -193,6 +203,7 @@ export const HostsValidations = <S extends string, V extends string[]>({
|
|
|
193
203
|
<FailingValidation<S>
|
|
194
204
|
key={validationId}
|
|
195
205
|
validation={validation}
|
|
206
|
+
host={host}
|
|
196
207
|
hostGroup={group}
|
|
197
208
|
severity={severity}
|
|
198
209
|
setCurrentStepId={setCurrentStepId}
|
|
@@ -50,6 +50,7 @@ export type FailingValidationsProps<S extends string> = {
|
|
|
50
50
|
severity?: 'danger' | 'warning';
|
|
51
51
|
wizardStepNames: { [key in S]: string };
|
|
52
52
|
wizardStepsValidationsMap: WizardStepsValidationMap<S>;
|
|
53
|
+
host?: Host;
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
export type ValidationActionLinkProps<S extends string> = {
|
|
@@ -28,6 +28,15 @@ export type WizardStepValidationMap = {
|
|
|
28
28
|
validationIds: HostValidationId[];
|
|
29
29
|
};
|
|
30
30
|
softValidationIds: (HostValidationId | ClusterValidationId)[];
|
|
31
|
+
getPageURL?: (
|
|
32
|
+
host: Host,
|
|
33
|
+
validationId: string,
|
|
34
|
+
) =>
|
|
35
|
+
| {
|
|
36
|
+
url: string;
|
|
37
|
+
name: string;
|
|
38
|
+
}
|
|
39
|
+
| undefined;
|
|
31
40
|
};
|
|
32
41
|
|
|
33
42
|
export type WizardStepsValidationMap<T extends string> = {
|
|
@@ -49,7 +49,7 @@ const SelectField: React.FC<SelectFieldProps> = ({
|
|
|
49
49
|
onChange={(value, event) => {
|
|
50
50
|
//customHandleChange enables calling formik change handler explicitly, useful for example to have the previous value
|
|
51
51
|
callFormikOnChange && field.onChange(event);
|
|
52
|
-
onChange && onChange(event);
|
|
52
|
+
onChange && onChange(value, event);
|
|
53
53
|
}}
|
|
54
54
|
>
|
|
55
55
|
{options.map((option, index) => (
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
SelectOptionProps,
|
|
6
6
|
TooltipProps,
|
|
7
7
|
RadioProps,
|
|
8
|
+
FormSelectProps,
|
|
8
9
|
} from '@patternfly/react-core';
|
|
9
10
|
import { FieldValidator, FieldHelperProps } from 'formik';
|
|
10
11
|
import { DropzoneProps, DropFileEventHandler } from 'react-dropzone';
|
|
@@ -37,7 +38,7 @@ export interface FieldProps {
|
|
|
37
38
|
|
|
38
39
|
export interface SelectFieldProps extends FieldProps {
|
|
39
40
|
options: FormSelectOptionProps[];
|
|
40
|
-
onChange?:
|
|
41
|
+
onChange?: FormSelectProps['onChange'];
|
|
41
42
|
getHelperText?: (value: string) => React.ReactNode | undefined;
|
|
42
43
|
// onBlur?: (event: React.FormEvent<HTMLSelectElement>) => void;
|
|
43
44
|
}
|
|
@@ -352,8 +352,8 @@ export const operatorLabels = (
|
|
|
352
352
|
};
|
|
353
353
|
};
|
|
354
354
|
|
|
355
|
-
export const
|
|
356
|
-
|
|
355
|
+
export const getOCPStaticIPDocLink = (docVersion = '2.8') =>
|
|
356
|
+
`https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/${docVersion}/html-single/clusters/index#on-prem-creating-your-cluster-with-the-cli-nmstateconfig`;
|
|
357
357
|
|
|
358
358
|
export const AI_UI_TAG = 'ui_ocm';
|
|
359
359
|
|
package/package.json
CHANGED