@openshift-assisted/ui-lib 2.42.3 → 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 +5 -3
- 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 +6 -4
- 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
|
@@ -35,32 +35,29 @@ const noSubnetAvailableOption = {
|
|
|
35
35
|
export const SubnetsDropdown = ({ name, machineSubnets, isDisabled }: SubnetsDropdownProps) => {
|
|
36
36
|
const [field, , { setValue }] = useField(name);
|
|
37
37
|
const [isOpen, setOpen] = React.useState(false);
|
|
38
|
-
const [currentDisplayValue, setCurrentDisplayValue] = React.useState<string | undefined>();
|
|
39
38
|
const fieldId = getFieldId(name, 'input');
|
|
40
39
|
|
|
41
|
-
const itemsSubnets = React.useMemo(() => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
const { itemsSubnets, currentDisplayValue } = React.useMemo(() => {
|
|
41
|
+
const itemsSubnets =
|
|
42
|
+
machineSubnets.length === 0
|
|
43
|
+
? [noSubnetAvailableOption]
|
|
44
|
+
: [makeNoSubnetSelectedOption(machineSubnets.length)].concat(
|
|
45
|
+
toFormSelectOptions(machineSubnets),
|
|
46
|
+
);
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
let currentDisplayValue = itemsSubnets[0].label; // The placeholder is the fallback
|
|
50
49
|
if (field.value) {
|
|
51
|
-
// If the field already has a value then it must have been assigned from one of the entries in the `itemsSubnets`
|
|
52
50
|
const subnetItem = itemsSubnets.find((item) => item.value === field.value);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
itemsSubnets.length === 2 ? itemsSubnets[1].label : itemsSubnets[0].label;
|
|
60
|
-
setCurrentDisplayValue(defaultValue);
|
|
51
|
+
if (subnetItem) {
|
|
52
|
+
currentDisplayValue = subnetItem.label;
|
|
53
|
+
}
|
|
54
|
+
} else if (machineSubnets.length === 1) {
|
|
55
|
+
// When there is only one subnet, it's selected by default. We skip the placeholder at index 0.
|
|
56
|
+
currentDisplayValue = itemsSubnets[1].label;
|
|
61
57
|
}
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
|
|
59
|
+
return { itemsSubnets, currentDisplayValue: currentDisplayValue };
|
|
60
|
+
}, [machineSubnets, field.value]);
|
|
64
61
|
|
|
65
62
|
const dropdownItems = itemsSubnets.map(({ value, label, isDisabled }) => (
|
|
66
63
|
<DropdownItem key={value} id={value} isDisabled={isDisabled} value={value}>
|
|
@@ -68,11 +65,7 @@ export const SubnetsDropdown = ({ name, machineSubnets, isDisabled }: SubnetsDro
|
|
|
68
65
|
</DropdownItem>
|
|
69
66
|
));
|
|
70
67
|
|
|
71
|
-
const onSelect = (
|
|
72
|
-
event?: React.MouseEvent<Element, MouseEvent>,
|
|
73
|
-
value?: string | number,
|
|
74
|
-
): void => {
|
|
75
|
-
setCurrentDisplayValue(value as string);
|
|
68
|
+
const onSelect = (event?: React.MouseEvent<Element, MouseEvent>): void => {
|
|
76
69
|
setValue(event?.currentTarget.id);
|
|
77
70
|
setOpen(false);
|
|
78
71
|
};
|
|
@@ -201,7 +201,7 @@ export const getIpAddressInSubnetValidationSchema = (
|
|
|
201
201
|
) => {
|
|
202
202
|
return Yup.string().test(
|
|
203
203
|
'is-in-subnet',
|
|
204
|
-
`IP Address is outside of the
|
|
204
|
+
`IP Address is outside of the subnet ${subnet}`,
|
|
205
205
|
(value, testContext: Yup.TestContext) => {
|
|
206
206
|
if (!value) {
|
|
207
207
|
return true;
|
|
@@ -82,10 +82,10 @@ const MachineNetwork: React.FC<{ fieldName: string; protocolVersion: ProtocolVer
|
|
|
82
82
|
labelIcon={
|
|
83
83
|
<PopoverIcon noVerticalAlign bodyContent="The range of IP addresses of the hosts." />
|
|
84
84
|
}
|
|
85
|
-
label="
|
|
85
|
+
label="Subnet"
|
|
86
86
|
fieldId={fieldId}
|
|
87
87
|
isRequired
|
|
88
|
-
className="
|
|
88
|
+
className="subnet"
|
|
89
89
|
>
|
|
90
90
|
<Flex>
|
|
91
91
|
<FlexItem spacer={{ default: 'spacerSm' }}>
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
font-weight: unset;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.
|
|
19
|
+
.subnet .pf-l-flex > div:nth-child(1) {
|
|
20
20
|
flex: 0 0 24rem;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
23
|
+
.subnet .pf-l-flex > div:nth-child(3) {
|
|
24
24
|
flex: 0 0 6rem;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.
|
|
27
|
+
.subnet .pf-v5-c-form__helper-text.pf-m-error {
|
|
28
28
|
margin-top: unset;
|
|
29
29
|
}
|
|
@@ -44,7 +44,7 @@ const getPrefixLength = (
|
|
|
44
44
|
): number => {
|
|
45
45
|
const machineNetwork = networkWide.ipConfigs[protocolVersion].machineNetwork;
|
|
46
46
|
if (machineNetwork.prefixLength === '') {
|
|
47
|
-
throw '
|
|
47
|
+
throw 'Subnet prefix length not configured';
|
|
48
48
|
}
|
|
49
49
|
return machineNetwork.prefixLength;
|
|
50
50
|
};
|
|
@@ -114,7 +114,7 @@ export const HostsInstallationFailed = ({
|
|
|
114
114
|
const { resetClusterDialog } = useModalDialogsContext();
|
|
115
115
|
const getID = (suffix: string) => `cluster-install-error-${suffix}`;
|
|
116
116
|
let title, message;
|
|
117
|
-
if (cluster.
|
|
117
|
+
if (cluster.controlPlaneCount === 1 || failedHosts > 0) {
|
|
118
118
|
title = 'Control plane was not installed';
|
|
119
119
|
message = `${failedHosts}/${totalHosts} control plane nodes failed to install. Please check the installation logs for more information.`;
|
|
120
120
|
} else if (isCriticalNumberOfWorkersFailed) {
|
|
@@ -22,7 +22,7 @@ const CredentialsDownload: React.FC<{ cluster: Cluster }> = ({ cluster }) => {
|
|
|
22
22
|
const clusterWizardContext = useClusterWizardContext();
|
|
23
23
|
const [isChecked, setIsChecked] = React.useState<boolean>(false);
|
|
24
24
|
const [isDownloading, setIsDownloading] = React.useState(false);
|
|
25
|
-
const { addAlert } = useAlerts();
|
|
25
|
+
const { addAlert, clearAlerts } = useAlerts();
|
|
26
26
|
const { t } = useTranslation();
|
|
27
27
|
|
|
28
28
|
const downloadSingleFile = async (fileName: string) => {
|
|
@@ -42,6 +42,7 @@ const CredentialsDownload: React.FC<{ cluster: Cluster }> = ({ cluster }) => {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
const handleDownloadClick = async () => {
|
|
45
|
+
clearAlerts();
|
|
45
46
|
setIsDownloading(true);
|
|
46
47
|
|
|
47
48
|
const configSuccess = await downloadSingleFile('kubeconfig');
|
|
@@ -21,6 +21,10 @@ import { setServerUpdateError, updateCluster } from '../../store/slices/current-
|
|
|
21
21
|
import { getApiErrorMessage, handleApiError, isUnknownServerError } from '../../../common/api';
|
|
22
22
|
import { canNextOperators } from './wizardTransition';
|
|
23
23
|
|
|
24
|
+
// Balance debounce time: fast clicks should trigger a single API call,
|
|
25
|
+
// but making it shorter will allow us to disable navigation buttons while changes are pending
|
|
26
|
+
const operatorsAutoSaveDebounce = 500;
|
|
27
|
+
|
|
24
28
|
const getOperatorsInitialValues = (
|
|
25
29
|
uiSettings: UISettingsValues | undefined,
|
|
26
30
|
cluster: Cluster,
|
|
@@ -34,7 +38,7 @@ const getOperatorsInitialValues = (
|
|
|
34
38
|
const OperatorsForm = ({ cluster }: { cluster: Cluster }) => {
|
|
35
39
|
const { alerts } = useAlerts();
|
|
36
40
|
const clusterWizardContext = useClusterWizardContext();
|
|
37
|
-
const isAutoSaveRunning = useFormikAutoSave();
|
|
41
|
+
const isAutoSaveRunning = useFormikAutoSave(operatorsAutoSaveDebounce);
|
|
38
42
|
const { errors, touched, isSubmitting, isValid } = useFormikContext<OperatorsValues>();
|
|
39
43
|
const navigate = useNavigate();
|
|
40
44
|
const { pathname } = useLocation();
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextContent, Text, Split, SplitItem } from '@patternfly/react-core';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ASSISTED_INSTALLER_DOCUMENTATION_LINK,
|
|
5
|
+
DeveloperPreview,
|
|
6
|
+
ExternalLink,
|
|
7
|
+
isInOcm,
|
|
8
|
+
} from '../../../common';
|
|
9
|
+
import { useFeature } from '../../hooks/use-feature';
|
|
4
10
|
|
|
5
11
|
export const AssistedInstallerHeader = () => {
|
|
12
|
+
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
6
13
|
return (
|
|
7
14
|
<TextContent>
|
|
8
15
|
<Text component="h1" className="pf-v5-u-display-inline">
|
|
9
16
|
Install OpenShift with the Assisted Installer
|
|
10
17
|
</Text>
|
|
18
|
+
{isSingleClusterFeatureEnabled && <DeveloperPreview />}
|
|
11
19
|
<Split hasGutter>
|
|
12
20
|
<SplitItem>
|
|
13
21
|
<ExternalLink href={ASSISTED_INSTALLER_DOCUMENTATION_LINK}>
|
|
@@ -205,6 +205,9 @@ export const SingleClusterPage = ({
|
|
|
205
205
|
resetModal: React.ReactNode;
|
|
206
206
|
}) => (
|
|
207
207
|
<AlertsContextProvider>
|
|
208
|
+
<PageSection variant={PageSectionVariants.light}>
|
|
209
|
+
<AssistedInstallerHeader />
|
|
210
|
+
</PageSection>
|
|
208
211
|
<ClusterPageGeneric clusterId={clusterId} resetModal={resetModal} />
|
|
209
212
|
</AlertsContextProvider>
|
|
210
213
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { PageSectionVariants, PageSection } from '@patternfly/react-core';
|
|
3
3
|
import { AlertsContextProvider } from '../../../common';
|
|
4
4
|
import ClusterBreadcrumbs from './ClusterBreadcrumbs';
|
|
@@ -13,7 +13,7 @@ import { AssistedInstallerHeader } from './AssistedInstallerHeader';
|
|
|
13
13
|
import { ModalDialogsContextProvider } from '../hosts/ModalDialogsContext';
|
|
14
14
|
import { OpenShiftVersionsContextProvider } from '../clusterWizard/OpenShiftVersionsContext';
|
|
15
15
|
|
|
16
|
-
const NewClusterPageGeneric = ({
|
|
16
|
+
const NewClusterPageGeneric = ({ children }: React.PropsWithChildren<unknown>) => {
|
|
17
17
|
return (
|
|
18
18
|
<AlertsContextProvider>
|
|
19
19
|
<SentryErrorMonitorContextProvider>
|
|
@@ -24,7 +24,10 @@ const NewClusterPageGeneric = ({ pageTitleSection }: { pageTitleSection?: ReactN
|
|
|
24
24
|
>
|
|
25
25
|
<OpenShiftVersionsContextProvider>
|
|
26
26
|
<NewFeatureSupportLevelProvider loadingUi={<ClusterLoading />}>
|
|
27
|
-
{
|
|
27
|
+
{children}
|
|
28
|
+
<PageSection variant={PageSectionVariants.light}>
|
|
29
|
+
<AssistedInstallerHeader />
|
|
30
|
+
</PageSection>
|
|
28
31
|
<PageSection variant={PageSectionVariants.light} isFilled>
|
|
29
32
|
<ClusterWizardContextProvider>
|
|
30
33
|
<NewClusterWizard />
|
|
@@ -39,16 +42,9 @@ const NewClusterPageGeneric = ({ pageTitleSection }: { pageTitleSection?: ReactN
|
|
|
39
42
|
);
|
|
40
43
|
};
|
|
41
44
|
|
|
42
|
-
const NewClusterTitleSection = () => (
|
|
43
|
-
<>
|
|
44
|
-
<ClusterBreadcrumbs clusterName="New cluster" />
|
|
45
|
-
<PageSection variant={PageSectionVariants.light}>
|
|
46
|
-
<AssistedInstallerHeader />
|
|
47
|
-
</PageSection>
|
|
48
|
-
</>
|
|
49
|
-
);
|
|
50
|
-
|
|
51
45
|
export const NewSingleClusterPage = () => <NewClusterPageGeneric />;
|
|
52
46
|
export const NewClusterPage = () => (
|
|
53
|
-
<NewClusterPageGeneric
|
|
47
|
+
<NewClusterPageGeneric>
|
|
48
|
+
<ClusterBreadcrumbs clusterName="New cluster" />
|
|
49
|
+
</NewClusterPageGeneric>
|
|
54
50
|
);
|
|
@@ -326,7 +326,14 @@ export const useHostsTable = (cluster: Cluster) => {
|
|
|
326
326
|
throw new Error(`Failed to edit role in host: ${host.id}.\nMissing cluster_id`);
|
|
327
327
|
}
|
|
328
328
|
const { data } = await HostsService.updateRole(host, role);
|
|
329
|
-
|
|
329
|
+
|
|
330
|
+
if (resetCluster) {
|
|
331
|
+
void resetCluster();
|
|
332
|
+
} else {
|
|
333
|
+
dispatch(updateHost(data));
|
|
334
|
+
// Reload to obtain cluster-level validations that may be affected by role change
|
|
335
|
+
dispatch(forceReload());
|
|
336
|
+
}
|
|
330
337
|
} catch (e) {
|
|
331
338
|
handleApiError(e, () =>
|
|
332
339
|
addAlert({ title: 'Failed to set role', message: getApiErrorMessage(e) }),
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import OperatorsAPI from '../../common/api/assisted-service/OperatorsAPI';
|
|
2
|
+
import { getOperatorSpecs } from '../../common/components/operators/operatorSpecs';
|
|
3
|
+
|
|
4
|
+
const getAllKnownOperatorKeys = (): Set<string> => {
|
|
5
|
+
const allSpecsByCategory = getOperatorSpecs(() => undefined);
|
|
6
|
+
|
|
7
|
+
const allKeys = Object.values(allSpecsByCategory)
|
|
8
|
+
.flat()
|
|
9
|
+
.map((spec) => spec.operatorKey);
|
|
10
|
+
|
|
11
|
+
return new Set(allKeys);
|
|
12
|
+
};
|
|
2
13
|
|
|
3
14
|
const OperatorsService = {
|
|
4
15
|
getSupportedOperators: async (): Promise<string[]> => {
|
|
5
|
-
const
|
|
6
|
-
|
|
16
|
+
const knownOperatorKeys = getAllKnownOperatorKeys();
|
|
17
|
+
const { data: operatorsFromAPI } = await OperatorsAPI.list();
|
|
18
|
+
const filteredOperators = operatorsFromAPI.filter((operatorName) =>
|
|
19
|
+
knownOperatorKeys.has(operatorName),
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
return filteredOperators;
|
|
7
23
|
},
|
|
8
24
|
};
|
|
9
25
|
export default OperatorsService;
|
|
@@ -5,7 +5,7 @@ export const selectCurrentClusterState = (state: RootStateDay1) => state.current
|
|
|
5
5
|
export const selectCurrentCluster = (state: RootStateDay1) => state.currentCluster.data;
|
|
6
6
|
export const selectCurrentClusterUIState = (state: RootStateDay1) => state.currentCluster.uiState;
|
|
7
7
|
export const selectIsCurrentClusterSNO = (state: RootStateDay1) =>
|
|
8
|
-
state.currentCluster.data?.
|
|
8
|
+
state.currentCluster.data?.controlPlaneCount === 1;
|
|
9
9
|
export const selectCurrentClusterPermissionsState = (
|
|
10
10
|
state: RootStateDay1,
|
|
11
11
|
): AssistedInstallerPermissionTypesListType => {
|
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.43.0",
|
|
4
|
+
"@openshift-assisted/types": "2.43.0",
|
|
5
5
|
"@openshift-console/dynamic-plugin-sdk": "0.0.3",
|
|
6
6
|
"@patternfly/patternfly": "5.2.0",
|
|
7
7
|
"@patternfly/react-code-editor": "5.2.0",
|
|
@@ -140,5 +140,5 @@
|
|
|
140
140
|
]
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
"version": "2.
|
|
143
|
+
"version": "2.43.0"
|
|
144
144
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ClusterDetailsValues } from '../../../common/components/clusterWizard/types';
|
|
3
|
-
import { OpenshiftVersionOptionType } from '../../types';
|
|
4
|
-
type SNOControlGroupProps = {
|
|
5
|
-
versions: OpenshiftVersionOptionType[];
|
|
6
|
-
highAvailabilityMode: ClusterDetailsValues['highAvailabilityMode'];
|
|
7
|
-
};
|
|
8
|
-
declare const SNOControlGroup: ({ versions, highAvailabilityMode }: SNOControlGroupProps) => React.JSX.Element;
|
|
9
|
-
export default SNOControlGroup;
|
|
10
|
-
//# sourceMappingURL=SNOControlGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SNOControlGroup.d.ts","sourceRoot":"","sources":["../../../../../lib/common/components/clusterConfiguration/SNOControlGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAEtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAIzD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,EAAE,0BAA0B,EAAE,CAAC;IACvC,oBAAoB,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;CACpE,CAAC;AAEF,QAAA,MAAM,eAAe,uCAAwC,oBAAoB,sBAyBhF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service';
|
|
3
|
-
type SNODisclaimerProps = {
|
|
4
|
-
snoSupportLevel: SupportLevel;
|
|
5
|
-
isDisabled?: boolean;
|
|
6
|
-
snoExpansionSupported?: boolean;
|
|
7
|
-
};
|
|
8
|
-
declare const SNODisclaimer: ({ snoSupportLevel, isDisabled, snoExpansionSupported, }: SNODisclaimerProps) => React.JSX.Element | null;
|
|
9
|
-
export default SNODisclaimer;
|
|
10
|
-
//# sourceMappingURL=SNODisclaimer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SNODisclaimer.d.ts","sourceRoot":"","sources":["../../../../../lib/common/components/clusterConfiguration/SNODisclaimer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AAEpF,KAAK,kBAAkB,GAAG;IACxB,eAAe,EAAE,YAAY,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AACF,QAAA,MAAM,aAAa,4DAIhB,kBAAkB,6BA6DpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Cluster, SupportLevel } from '@openshift-assisted/types/assisted-installer-service';
|
|
3
|
-
import { FeatureId } from '../../types';
|
|
4
|
-
import { GetFeatureSupportLevel } from '../newFeatureSupportLevels';
|
|
5
|
-
export declare const isOCPVersionEqualsOrMore: (openshiftVersion: string, ocpVersionToCompare: string) => boolean;
|
|
6
|
-
export declare const highlightMatch: (text: string, searchTerm?: string) => React.ReactNode;
|
|
7
|
-
export declare const HighlightedText: ({ text, searchTerm }: {
|
|
8
|
-
text: string;
|
|
9
|
-
searchTerm?: string | undefined;
|
|
10
|
-
}) => React.JSX.Element;
|
|
11
|
-
export type OperatorSpec = {
|
|
12
|
-
operatorKey: string;
|
|
13
|
-
title: string;
|
|
14
|
-
featureId: FeatureId;
|
|
15
|
-
descriptionText?: string;
|
|
16
|
-
Description?: React.ComponentType<{
|
|
17
|
-
openshiftVersion?: string;
|
|
18
|
-
searchTerm?: string;
|
|
19
|
-
}>;
|
|
20
|
-
notStandalone?: boolean;
|
|
21
|
-
Requirements?: React.ComponentType<{
|
|
22
|
-
cluster: Cluster;
|
|
23
|
-
}>;
|
|
24
|
-
supportLevel?: SupportLevel | undefined;
|
|
25
|
-
};
|
|
26
|
-
export declare const getOperatorSpecs: (getFeatureSupportLevel: GetFeatureSupportLevel, useLVMS?: boolean) => {
|
|
27
|
-
[category: string]: OperatorSpec[];
|
|
28
|
-
};
|
|
29
|
-
export declare const useOperatorSpecs: () => {
|
|
30
|
-
byCategory: {
|
|
31
|
-
[category: string]: OperatorSpec[];
|
|
32
|
-
};
|
|
33
|
-
byKey: Record<string, OperatorSpec>;
|
|
34
|
-
};
|
|
35
|
-
export declare const getOperatorTitleByFeatureId: (featureId: FeatureId) => string | undefined;
|
|
36
|
-
declare enum Category {
|
|
37
|
-
STORAGE = 0,
|
|
38
|
-
VIRT = 1,
|
|
39
|
-
AI = 2,
|
|
40
|
-
NETWORK = 3,
|
|
41
|
-
CI_CD = 4,
|
|
42
|
-
PLATFORM = 5,
|
|
43
|
-
SECURITY = 6,
|
|
44
|
-
SCHEDULING = 7
|
|
45
|
-
}
|
|
46
|
-
export declare const categories: {
|
|
47
|
-
[key in Category]: string;
|
|
48
|
-
};
|
|
49
|
-
export {};
|
|
50
|
-
//# sourceMappingURL=test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../../../lib/common/components/operators/test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA+CxC,OAAO,EAAE,sBAAsB,EAA6B,MAAM,4BAA4B,CAAC;AAwB/F,eAAO,MAAM,wBAAwB,qBACjB,MAAM,uBACH,MAAM,KAC1B,OAOF,CAAC;AAEF,eAAO,MAAM,cAAc,SAAU,MAAM,eAAe,MAAM,KAAG,MAAM,SAUxE,CAAC;AAEF,eAAO,MAAM,eAAe;UAAkC,MAAM;;uBAEnE,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACzD,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,gBAAgB,2BACH,sBAAsB,YACpC,OAAO;;CAwSlB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;CAqB5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,cAAe,SAAS,KAAG,MAAM,GAAG,SAW3E,CAAC;AAEF,aAAK,QAAQ;IACX,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,EAAE,IAAA;IACF,OAAO,IAAA;IACP,KAAK,IAAA;IACL,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,UAAU,IAAA;CACX;AAED,eAAO,MAAM,UAAU,EAAE;KAAG,GAAG,IAAI,QAAQ,GAAG,MAAM;CASnD,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { OpenshiftVersionOptionType } from '../../../types';
|
|
3
|
-
import { CheckboxFieldProps } from './types';
|
|
4
|
-
type SingleNodeCheckboxProps = CheckboxFieldProps & {
|
|
5
|
-
versions: OpenshiftVersionOptionType[];
|
|
6
|
-
};
|
|
7
|
-
declare const SingleNodeCheckbox: React.FC<SingleNodeCheckboxProps>;
|
|
8
|
-
export default SingleNodeCheckbox;
|
|
9
|
-
//# sourceMappingURL=SingleNodeCheckbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SingleNodeCheckbox.d.ts","sourceRoot":"","sources":["../../../../../../lib/common/components/ui/formik/SingleNodeCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,KAAK,uBAAuB,GAAG,kBAAkB,GAAG;IAAE,QAAQ,EAAE,0BAA0B,EAAE,CAAA;CAAE,CAAC;AAE/F,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA4EzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CheckboxFieldProps } from '../../../common/components/ui/formik/types';
|
|
3
|
-
import { SupportLevel } from '@openshift-assisted/types/assisted-installer-service';
|
|
4
|
-
export interface OcmCheckboxProps extends CheckboxFieldProps {
|
|
5
|
-
disabledReason?: string;
|
|
6
|
-
isSupportedVersionAvailable?: boolean;
|
|
7
|
-
supportLevel?: SupportLevel;
|
|
8
|
-
}
|
|
9
|
-
declare const OcmSingleNodeCheckbox: React.FC<OcmCheckboxProps>;
|
|
10
|
-
export default OcmSingleNodeCheckbox;
|
|
11
|
-
//# sourceMappingURL=OcmSingleNodeCheckbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OcmSingleNodeCheckbox.d.ts","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusterConfiguration/OcmSingleNodeCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAGhF,OAAO,EAEL,YAAY,EACb,MAAM,sDAAsD,CAAC;AAE9D,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8ErD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
const formik_1 = require("formik");
|
|
6
|
-
const ui_1 = require("../ui");
|
|
7
|
-
const SNODisclaimer_1 = tslib_1.__importDefault(require("./SNODisclaimer"));
|
|
8
|
-
const featureSupportLevels_1 = require("../featureSupportLevels");
|
|
9
|
-
const SNOControlGroup = ({ versions, highAvailabilityMode }) => {
|
|
10
|
-
const { values } = (0, formik_1.useFormikContext)();
|
|
11
|
-
const featureSupportLevelContext = (0, featureSupportLevels_1.useFeatureSupportLevel)();
|
|
12
|
-
const snoSupportLevel = featureSupportLevelContext.getFeatureSupportLevel(values.openshiftVersion, 'SNO');
|
|
13
|
-
const snoExpansion = featureSupportLevelContext.isFeatureSupported(values.openshiftVersion, 'SINGLE_NODE_EXPANSION');
|
|
14
|
-
const isDisabled = featureSupportLevelContext.isFeatureDisabled(values.openshiftVersion, 'SNO');
|
|
15
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
16
|
-
react_1.default.createElement(ui_1.SingleNodeCheckbox, { name: "highAvailabilityMode", versions: versions, isDisabled: isDisabled }),
|
|
17
|
-
highAvailabilityMode === 'None' && snoSupportLevel && (react_1.default.createElement(SNODisclaimer_1.default, { isDisabled: isDisabled, snoSupportLevel: snoSupportLevel, snoExpansionSupported: snoExpansion }))));
|
|
18
|
-
};
|
|
19
|
-
exports.default = SNOControlGroup;
|
|
20
|
-
//# sourceMappingURL=SNOControlGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SNOControlGroup.js","sourceRoot":"","sources":["../../../../../lib/common/components/clusterConfiguration/SNOControlGroup.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,mCAA0C;AAE1C,8BAA2C;AAE3C,4EAA4C;AAC5C,kEAAiE;AAOjE,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAE,oBAAoB,EAAwB,EAAE,EAAE;IACnF,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,yBAAgB,GAAwB,CAAC;IAC5D,MAAM,0BAA0B,GAAG,IAAA,6CAAsB,GAAE,CAAC;IAC5D,MAAM,eAAe,GAAG,0BAA0B,CAAC,sBAAsB,CACvE,MAAM,CAAC,gBAAgB,EACvB,KAAK,CACN,CAAC;IACF,MAAM,YAAY,GAAG,0BAA0B,CAAC,kBAAkB,CAChE,MAAM,CAAC,gBAAgB,EACvB,uBAAuB,CACxB,CAAC;IACF,MAAM,UAAU,GAAG,0BAA0B,CAAC,iBAAiB,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAEhG,OAAO,CACL;QACE,8BAAC,uBAAkB,IAAC,IAAI,EAAC,sBAAsB,EAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,GAAI;QAC7F,oBAAoB,KAAK,MAAM,IAAI,eAAe,IAAI,CACrD,8BAAC,uBAAa,IACZ,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,qBAAqB,EAAE,YAAY,GACnC,CACH,CACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
-
const ui_1 = require("../ui");
|
|
7
|
-
const use_translation_wrapper_1 = require("../../hooks/use-translation-wrapper");
|
|
8
|
-
const SNODisclaimer = ({ snoSupportLevel, isDisabled = false, snoExpansionSupported = false, }) => {
|
|
9
|
-
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
10
|
-
if (!['dev-preview', 'supported'].includes(snoSupportLevel)) {
|
|
11
|
-
//if tech preview or unsupported there's no definition which warning to show
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
const isDevPreview = snoSupportLevel === 'dev-preview';
|
|
15
|
-
const generalSNOFacts = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
16
|
-
react_1.default.createElement(react_core_1.ListItem, null, t('ai:Installing SNO will result in an OpenShift deployment that is not highly available.')),
|
|
17
|
-
!snoExpansionSupported && (react_1.default.createElement(react_core_1.ListItem, null, t('ai:Currently, adding additional machines to your cluster is not supported.')))));
|
|
18
|
-
const unsupportedWarnings = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
19
|
-
react_1.default.createElement(react_core_1.ListItem, null, t('ai:SNO is in a proof-of-concept stage and is not supported in any way.')),
|
|
20
|
-
react_1.default.createElement(react_core_1.ListItem, null, t("ai:OpenShift in-place upgrades aren't expected to work with SNO. If an upgrade is needed, your system will need a redeployment."))));
|
|
21
|
-
return (react_1.default.createElement(react_core_1.Alert, { variant: isDevPreview ? react_core_1.AlertVariant.warning : react_core_1.AlertVariant.info, title: t('ai:Limitations for using Single Node OpenShift'), isInline: true },
|
|
22
|
-
react_1.default.createElement(react_core_1.Stack, { hasGutter: true },
|
|
23
|
-
react_1.default.createElement(react_core_1.StackItem, null,
|
|
24
|
-
react_1.default.createElement(react_core_1.List, null,
|
|
25
|
-
generalSNOFacts,
|
|
26
|
-
isDevPreview && unsupportedWarnings)),
|
|
27
|
-
isDevPreview && (react_1.default.createElement(react_core_1.StackItem, null,
|
|
28
|
-
react_1.default.createElement(ui_1.CheckboxField, { name: "SNODisclaimer", label: t('ai:I understand, accept, and agree to the limitations associated with using Single Node OpenShift.'), isDisabled: isDisabled }))))));
|
|
29
|
-
};
|
|
30
|
-
exports.default = SNODisclaimer;
|
|
31
|
-
//# sourceMappingURL=SNODisclaimer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SNODisclaimer.js","sourceRoot":"","sources":["../../../../../lib/common/components/clusterConfiguration/SNODisclaimer.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,uDAA+F;AAC/F,8BAAsC;AACtC,iFAAqE;AAQrE,MAAM,aAAa,GAAG,CAAC,EACrB,eAAe,EACf,UAAU,GAAG,KAAK,EAClB,qBAAqB,GAAG,KAAK,GACV,EAAE,EAAE;IACvB,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,wCAAc,GAAE,CAAC;IAC/B,IAAI,CAAC,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;QAC3D,4EAA4E;QAC5E,OAAO,IAAI,CAAC;KACb;IACD,MAAM,YAAY,GAAG,eAAe,KAAK,aAAa,CAAC;IACvD,MAAM,eAAe,GAAG,CACtB;QACE,8BAAC,qBAAQ,QACN,CAAC,CACA,wFAAwF,CACzF,CACQ;QACV,CAAC,qBAAqB,IAAI,CACzB,8BAAC,qBAAQ,QACN,CAAC,CAAC,4EAA4E,CAAC,CACvE,CACZ,CACA,CACJ,CAAC;IACF,MAAM,mBAAmB,GAAG,CAC1B;QACE,8BAAC,qBAAQ,QACN,CAAC,CAAC,wEAAwE,CAAC,CACnE;QACX,8BAAC,qBAAQ,QACN,CAAC,CACA,iIAAiI,CAClI,CACQ,CACV,CACJ,CAAC;IAEF,OAAO,CACL,8BAAC,kBAAK,IACJ,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,yBAAY,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAY,CAAC,IAAI,EAChE,KAAK,EAAE,CAAC,CAAC,gDAAgD,CAAC,EAC1D,QAAQ;QAER,8BAAC,kBAAK,IAAC,SAAS;YACd,8BAAC,sBAAS;gBACR,8BAAC,iBAAI;oBACF,eAAe;oBACf,YAAY,IAAI,mBAAmB,CAC/B,CACG;YACX,YAAY,IAAI,CACf,8BAAC,sBAAS;gBACR,8BAAC,kBAAa,IACZ,IAAI,EAAC,eAAe,EACpB,KAAK,EAAE,CAAC,CACN,oGAAoG,CACrG,EACD,UAAU,EAAE,UAAU,GACtB,CACQ,CACb,CACK,CACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC"}
|