@openshift-assisted/ui-lib 2.42.2 → 2.43.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/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/index.d.ts +0 -2
- package/build/@types/common/components/clusterConfiguration/index.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts +1 -4
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/types.d.ts +0 -2
- 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/SimpleDropdown.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/index.d.ts +0 -1
- package/build/@types/common/components/ui/formik/index.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 +3 -3
- package/build/@types/common/config/docs_links.d.ts.map +1 -1
- package/build/@types/common/selectors/clusterSelectors.d.ts +1 -1
- package/build/@types/common/selectors/clusterSelectors.d.ts.map +1 -1
- package/build/@types/common/types/cpuArchitecture.d.ts.map +1 -1
- package/build/@types/ocm/components/Routes.d.ts +2 -1
- package/build/@types/ocm/components/Routes.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmSNODisclaimer.d.ts +1 -4
- package/build/@types/ocm/components/clusterConfiguration/OcmSNODisclaimer.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetailsForm.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/CredentialsDownload.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/AssistedInstallerHeader.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/ClusterPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/NewClusterPage.d.ts.map +1 -1
- package/build/@types/ocm/components/hosts/use-hosts-table.d.ts.map +1 -1
- package/build/@types/ocm/services/OperatorsService.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/selectors.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +1 -4
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +9 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/index.js +1 -5
- package/build/cjs/common/components/clusterConfiguration/index.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +3 -23
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/hosts/DiskRole.js +1 -1
- package/build/cjs/common/components/hosts/DiskRole.js.map +1 -1
- package/build/cjs/common/components/hosts/TableToolbar.js +3 -3
- package/build/cjs/common/components/hosts/TableToolbar.js.map +1 -1
- package/build/cjs/common/components/operators/operatorSpecs.js +10 -8
- package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js +6 -7
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js.map +1 -1
- package/build/cjs/common/components/ui/SimpleDropdown.js +1 -1
- package/build/cjs/common/components/ui/SimpleDropdown.js.map +1 -1
- package/build/cjs/common/components/ui/formik/index.js +1 -3
- package/build/cjs/common/components/ui/formik/index.js.map +1 -1
- package/build/cjs/common/config/constants.js +0 -4
- package/build/cjs/common/config/constants.js.map +1 -1
- package/build/cjs/common/config/docs_links.js +13 -9
- package/build/cjs/common/config/docs_links.js.map +1 -1
- package/build/cjs/common/selectors/clusterSelectors.js +1 -1
- package/build/cjs/common/selectors/clusterSelectors.js.map +1 -1
- package/build/cjs/common/types/cpuArchitecture.js +3 -5
- package/build/cjs/common/types/cpuArchitecture.js.map +1 -1
- package/build/cjs/ocm/components/Routes.js +3 -2
- package/build/cjs/ocm/components/Routes.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +2 -4
- package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmSNODisclaimer.js +5 -21
- package/build/cjs/ocm/components/clusterConfiguration/OcmSNODisclaimer.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js +12 -18
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/components/staticIp.css +3 -3
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js +1 -1
- package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js +0 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/CredentialsDownload.js +2 -1
- package/build/cjs/ocm/components/clusterWizard/CredentialsDownload.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/Operators.js +4 -1
- package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js +3 -0
- package/build/cjs/ocm/components/clusters/AssistedInstallerHeader.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClusterPage.js +2 -0
- package/build/cjs/ocm/components/clusters/ClusterPage.js.map +1 -1
- package/build/cjs/ocm/components/clusters/NewClusterPage.js +6 -7
- package/build/cjs/ocm/components/clusters/NewClusterPage.js.map +1 -1
- package/build/cjs/ocm/components/hosts/use-hosts-table.js +8 -1
- package/build/cjs/ocm/components/hosts/use-hosts-table.js.map +1 -1
- package/build/cjs/ocm/services/DiskEncryptionService.js +1 -1
- package/build/cjs/ocm/services/DiskEncryptionService.js.map +1 -1
- package/build/cjs/ocm/services/OperatorsService.js +12 -2
- package/build/cjs/ocm/services/OperatorsService.js.map +1 -1
- package/build/cjs/ocm/store/slices/current-cluster/selectors.js +1 -1
- package/build/cjs/ocm/store/slices/current-cluster/selectors.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +1 -5
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +11 -2
- package/lib/common/components/clusterConfiguration/index.ts +0 -2
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +2 -33
- package/lib/common/components/clusterWizard/types.ts +0 -2
- package/lib/common/components/hosts/DiskRole.tsx +0 -1
- package/lib/common/components/hosts/TableToolbar.tsx +9 -10
- package/lib/common/components/operators/operatorSpecs.tsx +11 -8
- package/lib/common/components/ui/OpenShiftVersionDropdown.tsx +10 -10
- package/lib/common/components/ui/SimpleDropdown.tsx +0 -1
- package/lib/common/components/ui/formik/index.tsx +0 -1
- package/lib/common/config/constants.ts +0 -4
- package/lib/common/config/docs_links.ts +15 -15
- package/lib/common/selectors/clusterSelectors.ts +1 -2
- package/lib/common/types/cpuArchitecture.ts +3 -9
- package/lib/ocm/components/Routes.tsx +3 -0
- package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +3 -16
- package/lib/ocm/components/clusterConfiguration/OcmSNODisclaimer.tsx +14 -60
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.tsx +18 -25
- package/lib/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/staticIp/components/FormViewNetworkWide/FormViewNetworkWideFields.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/staticIp/components/staticIp.css +3 -3
- package/lib/ocm/components/clusterConfiguration/staticIp/data/formDataToInfraEnvField.ts +1 -1
- package/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx +1 -1
- package/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +0 -1
- package/lib/ocm/components/clusterWizard/CredentialsDownload.tsx +2 -1
- package/lib/ocm/components/clusterWizard/Operators.tsx +5 -1
- package/lib/ocm/components/clusters/AssistedInstallerHeader.tsx +9 -1
- package/lib/ocm/components/clusters/ClusterPage.tsx +3 -0
- package/lib/ocm/components/clusters/NewClusterPage.tsx +9 -13
- package/lib/ocm/components/hosts/use-hosts-table.tsx +8 -1
- package/lib/ocm/services/DiskEncryptionService.ts +1 -1
- package/lib/ocm/services/OperatorsService.tsx +18 -2
- package/lib/ocm/store/slices/current-cluster/selectors.ts +1 -1
- package/package.json +3 -3
- package/build/@types/common/components/clusterConfiguration/SNOControlGroup.d.ts +0 -10
- package/build/@types/common/components/clusterConfiguration/SNOControlGroup.d.ts.map +0 -1
- package/build/@types/common/components/clusterConfiguration/SNODisclaimer.d.ts +0 -10
- package/build/@types/common/components/clusterConfiguration/SNODisclaimer.d.ts.map +0 -1
- package/build/@types/common/components/operators/test.d.ts +0 -50
- package/build/@types/common/components/operators/test.d.ts.map +0 -1
- package/build/@types/common/components/ui/formik/SingleNodeCheckbox.d.ts +0 -9
- package/build/@types/common/components/ui/formik/SingleNodeCheckbox.d.ts.map +0 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.d.ts +0 -11
- package/build/@types/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.d.ts.map +0 -1
- package/build/cjs/common/components/clusterConfiguration/SNOControlGroup.js +0 -20
- package/build/cjs/common/components/clusterConfiguration/SNOControlGroup.js.map +0 -1
- package/build/cjs/common/components/clusterConfiguration/SNODisclaimer.js +0 -31
- package/build/cjs/common/components/clusterConfiguration/SNODisclaimer.js.map +0 -1
- package/build/cjs/common/components/operators/test.js +0 -323
- package/build/cjs/common/components/operators/test.js.map +0 -1
- package/build/cjs/common/components/ui/formik/SingleNodeCheckbox.js +0 -45
- package/build/cjs/common/components/ui/formik/SingleNodeCheckbox.js.map +0 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.js +0 -51
- package/build/cjs/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.js.map +0 -1
- package/lib/common/components/clusterConfiguration/SNOControlGroup.tsx +0 -41
- package/lib/common/components/clusterConfiguration/SNODisclaimer.tsx +0 -79
- package/lib/common/components/operators/test.tsx +0 -469
- package/lib/common/components/ui/formik/SingleNodeCheckbox.tsx +0 -98
- package/lib/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.tsx +0 -107
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { useField, useFormikContext } from 'formik';
|
|
3
|
-
import {
|
|
4
|
-
Checkbox,
|
|
5
|
-
FormGroup,
|
|
6
|
-
FormHelperText,
|
|
7
|
-
HelperText,
|
|
8
|
-
HelperTextItem,
|
|
9
|
-
Tooltip,
|
|
10
|
-
} from '@patternfly/react-core';
|
|
11
|
-
import { getFieldId } from '../../../common';
|
|
12
|
-
import { useNewFeatureSupportLevel } from '../../../common/components/newFeatureSupportLevels';
|
|
13
|
-
import { CheckboxFieldProps } from '../../../common/components/ui/formik/types';
|
|
14
|
-
import NewFeatureSupportLevelBadge from '../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge';
|
|
15
|
-
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
16
|
-
import {
|
|
17
|
-
ClusterCreateParams,
|
|
18
|
-
SupportLevel,
|
|
19
|
-
} from '@openshift-assisted/types/assisted-installer-service';
|
|
20
|
-
|
|
21
|
-
export interface OcmCheckboxProps extends CheckboxFieldProps {
|
|
22
|
-
disabledReason?: string;
|
|
23
|
-
isSupportedVersionAvailable?: boolean;
|
|
24
|
-
supportLevel?: SupportLevel;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const OcmSingleNodeCheckbox: React.FC<OcmCheckboxProps> = ({
|
|
28
|
-
disabledReason,
|
|
29
|
-
isSupportedVersionAvailable,
|
|
30
|
-
validate,
|
|
31
|
-
idPostfix,
|
|
32
|
-
supportLevel,
|
|
33
|
-
...props
|
|
34
|
-
}) => {
|
|
35
|
-
const {
|
|
36
|
-
values: { openshiftVersion },
|
|
37
|
-
} = useFormikContext<ClusterCreateParams>();
|
|
38
|
-
const [field, meta, helpers] = useField<'None' | 'Full'>({ name: props.name, validate });
|
|
39
|
-
const featureSupportLevelContext = useNewFeatureSupportLevel();
|
|
40
|
-
const prevVersionRef = React.useRef(openshiftVersion);
|
|
41
|
-
const prevIsDisabled = React.useRef(props.isDisabled);
|
|
42
|
-
const fieldId = getFieldId(props.name, 'input', idPostfix);
|
|
43
|
-
const { t } = useTranslation();
|
|
44
|
-
const { value } = meta;
|
|
45
|
-
const { setValue } = helpers;
|
|
46
|
-
|
|
47
|
-
const onChanged = React.useCallback(
|
|
48
|
-
(checked: boolean) => setValue(checked ? 'None' : 'Full'),
|
|
49
|
-
[setValue],
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
React.useEffect(() => {
|
|
53
|
-
if (
|
|
54
|
-
prevVersionRef.current !== openshiftVersion &&
|
|
55
|
-
!featureSupportLevelContext.isFeatureSupported('SNO')
|
|
56
|
-
) {
|
|
57
|
-
//invoke updating SNO value only if the version changed to not be in danger of touching existing clusters
|
|
58
|
-
onChanged(false);
|
|
59
|
-
}
|
|
60
|
-
prevVersionRef.current = openshiftVersion;
|
|
61
|
-
}, [openshiftVersion, onChanged, featureSupportLevelContext]);
|
|
62
|
-
|
|
63
|
-
React.useEffect(() => {
|
|
64
|
-
if (prevIsDisabled.current !== props.isDisabled) {
|
|
65
|
-
onChanged(false);
|
|
66
|
-
}
|
|
67
|
-
prevIsDisabled.current = props.isDisabled;
|
|
68
|
-
}, [props.isDisabled, setValue, onChanged]);
|
|
69
|
-
|
|
70
|
-
if (isSupportedVersionAvailable) {
|
|
71
|
-
return (
|
|
72
|
-
<FormGroup id={`form-control__${fieldId}`} isInline fieldId={fieldId}>
|
|
73
|
-
<Tooltip hidden={!disabledReason} content={disabledReason}>
|
|
74
|
-
<Checkbox
|
|
75
|
-
{...field}
|
|
76
|
-
{...props}
|
|
77
|
-
id={fieldId}
|
|
78
|
-
label={
|
|
79
|
-
<>
|
|
80
|
-
{t('ai:Install single node OpenShift (SNO)')}
|
|
81
|
-
<NewFeatureSupportLevelBadge featureId="SNO" supportLevel={supportLevel} />
|
|
82
|
-
</>
|
|
83
|
-
}
|
|
84
|
-
aria-describedby={`${fieldId}-helper`}
|
|
85
|
-
description={
|
|
86
|
-
<FormGroup>
|
|
87
|
-
<FormHelperText>
|
|
88
|
-
<HelperText id={fieldId}>
|
|
89
|
-
<HelperTextItem>
|
|
90
|
-
{t('ai:SNO enables you to install OpenShift using only one host.')}
|
|
91
|
-
</HelperTextItem>
|
|
92
|
-
</HelperText>
|
|
93
|
-
</FormHelperText>
|
|
94
|
-
</FormGroup>
|
|
95
|
-
}
|
|
96
|
-
isChecked={value === 'None'}
|
|
97
|
-
onChange={(event, value) => onChanged(value)}
|
|
98
|
-
className="with-tooltip"
|
|
99
|
-
/>
|
|
100
|
-
</Tooltip>
|
|
101
|
-
</FormGroup>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
return null;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export default OcmSingleNodeCheckbox;
|