@openshift-assisted/ui-lib 2.14.0-cim → 2.14.2-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/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts +2 -3
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts +3 -0
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts +15 -2
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.d.ts +1 -2
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts +1 -2
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.d.ts +8 -7
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.d.ts +17 -0
- package/build/@types/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.d.ts +8 -0
- package/build/@types/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/components/ValidationSection.d.ts +16 -0
- package/build/@types/cim/components/ClusterDeployment/components/ValidationSection.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/constants.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/constants.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/index.d.ts +1 -2
- package/build/@types/cim/components/ClusterDeployment/index.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts +1 -11
- package/build/@types/cim/components/ClusterDeployment/networkConfigurationValidation.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/types.d.ts +7 -9
- package/build/@types/cim/components/ClusterDeployment/types.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts +8 -2
- package/build/@types/cim/components/ClusterDeployment/use-networking-formik.d.ts.map +1 -1
- package/build/@types/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.d.ts.map +1 -1
- package/build/@types/cim/components/Hypershift/types.d.ts +6 -3
- package/build/@types/cim/components/Hypershift/types.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvAgentTable.d.ts.map +1 -1
- package/build/@types/cim/components/common/constants.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/agents.d.ts +3 -0
- package/build/@types/cim/components/helpers/agents.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/toAssisted.d.ts.map +1 -1
- package/build/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/EditAgentModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts +3 -0
- package/build/@types/cim/components/modals/ScaleUpModal.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts +1 -0
- package/build/@types/cim/types/k8s/infra-env-k8s-resource.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +7 -0
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -0
- package/build/@types/common/components/clusterConfiguration/DiscoveryImageConfigForm.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
- package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
- package/build/@types/common/components/hosts/EditHostForm.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -0
- package/build/@types/ocm/store/slices/current-cluster/slice.d.ts.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js +9 -7
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +26 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js +13 -29
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js +2 -12
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js +50 -26
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js +3 -3
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js +39 -21
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js +58 -27
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.js +24 -24
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js +26 -42
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.js +12 -8
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js +4 -5
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js +5 -5
- package/build/cjs/cim/components/ClusterDeployment/NetworkConfiguration.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.js +50 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.js +24 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ValidationSection.js +17 -0
- package/build/cjs/cim/components/ClusterDeployment/components/ValidationSection.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/constants.js +2 -0
- package/build/cjs/cim/components/ClusterDeployment/constants.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/index.js +2 -5
- package/build/cjs/cim/components/ClusterDeployment/index.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js +1 -14
- package/build/cjs/cim/components/ClusterDeployment/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.js +6 -4
- package/build/cjs/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -12
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js +1 -1
- package/build/cjs/cim/components/InfraEnv/OpenshiftVersionDropdown.js.map +1 -1
- package/build/cjs/cim/components/common/constants.js +1 -1
- package/build/cjs/cim/components/common/constants.js.map +1 -1
- package/build/cjs/cim/components/helpers/agents.js +19 -1
- package/build/cjs/cim/components/helpers/agents.js.map +1 -1
- package/build/cjs/cim/components/helpers/toAssisted.js +25 -22
- package/build/cjs/cim/components/helpers/toAssisted.js.map +1 -1
- package/build/cjs/cim/components/modals/AddHostModal.js +4 -5
- package/build/cjs/cim/components/modals/AddHostModal.js.map +1 -1
- package/build/cjs/cim/components/modals/EditAgentModal.js +2 -2
- package/build/cjs/cim/components/modals/EditAgentModal.js.map +1 -1
- package/build/cjs/cim/components/modals/ScaleUpModal.js +3 -2
- package/build/cjs/cim/components/modals/ScaleUpModal.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +41 -0
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -0
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js +4 -5
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageConfigForm.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js +5 -5
- package/build/cjs/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +1 -0
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js +14 -18
- package/build/cjs/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js +4 -4
- package/build/cjs/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.js.map +1 -1
- package/build/cjs/common/components/hosts/EditHostForm.js +3 -3
- package/build/cjs/common/components/hosts/EditHostForm.js.map +1 -1
- package/build/cjs/common/components/ui/formik/validationSchemas.js +18 -15
- package/build/cjs/common/components/ui/formik/validationSchemas.js.map +1 -1
- package/build/cjs/common/config/constants.js +1 -1
- package/build/cjs/common/config/constants.js.map +1 -1
- package/lib/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.tsx +11 -9
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +63 -3
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.tsx +25 -53
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.tsx +7 -16
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.tsx +102 -59
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx +16 -10
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.tsx +84 -48
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.tsx +106 -54
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.tsx +96 -85
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizard.tsx +109 -119
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardContext.tsx +27 -14
- package/lib/cim/components/ClusterDeployment/ClusterDetailsFormFields.tsx +4 -6
- package/lib/cim/components/ClusterDeployment/NetworkConfiguration.tsx +5 -5
- package/lib/cim/components/ClusterDeployment/components/ClusterDeploymentHostsSelectionAdvanced.tsx +107 -0
- package/lib/cim/components/ClusterDeployment/components/ClusterScaleUpAutoHostsSelection.tsx +49 -0
- package/lib/cim/components/ClusterDeployment/components/ValidationSection.tsx +41 -0
- package/lib/cim/components/ClusterDeployment/constants.ts +3 -1
- package/lib/cim/components/ClusterDeployment/index.ts +1 -3
- package/lib/cim/components/ClusterDeployment/networkConfigurationValidation.ts +1 -26
- package/lib/cim/components/ClusterDeployment/types.ts +7 -10
- package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +3 -3
- package/lib/cim/components/Hypershift/DetailsPage/HypershiftKubeconfigDownload.tsx +4 -2
- package/lib/cim/components/Hypershift/types.ts +6 -3
- package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +7 -16
- package/lib/cim/components/InfraEnv/OpenshiftVersionDropdown.tsx +1 -1
- package/lib/cim/components/common/constants.ts +1 -2
- package/lib/cim/components/helpers/agents.ts +30 -1
- package/lib/cim/components/helpers/toAssisted.ts +13 -8
- package/lib/cim/components/modals/AddHostModal.tsx +4 -5
- package/lib/cim/components/modals/EditAgentModal.tsx +2 -1
- package/lib/cim/components/modals/ScaleUpModal.tsx +12 -2
- package/lib/cim/types/k8s/infra-env-k8s-resource.ts +1 -0
- package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +93 -0
- package/lib/common/components/clusterConfiguration/DiscoveryImageConfigForm.tsx +10 -12
- package/lib/common/components/clusterConfiguration/DiscoveryImageTypeControlGroup.tsx +9 -9
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +1 -0
- package/lib/common/components/clusterWizard/networkingSteps/AvailableSubnetsControl.tsx +50 -61
- package/lib/common/components/clusterWizard/networkingSteps/VirtualIPControlGroup.tsx +4 -4
- package/lib/common/components/clusterWizard/types.ts +1 -0
- package/lib/common/components/hosts/EditHostForm.tsx +16 -6
- package/lib/common/components/ui/formik/validationSchemas.ts +13 -10
- package/lib/common/config/constants.ts +1 -1
- package/package.json +4 -3
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.d.ts +0 -10
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.d.ts +0 -13
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.d.ts +0 -4
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.d.ts +0 -7
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.d.ts.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.js +0 -31
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.js +0 -50
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.js +0 -35
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.js +0 -9
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.js.map +0 -1
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentCreateProgress.tsx +0 -79
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardFooter.tsx +0 -128
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardNavigation.tsx +0 -81
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizardStep.tsx +0 -13
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Alert, AlertGroup, AlertVariant } from '@patternfly/react-core';
|
|
3
|
-
import {
|
|
4
|
-
Alerts,
|
|
5
|
-
WizardFooter,
|
|
6
|
-
useAlerts,
|
|
7
|
-
WizardFooterGenericProps,
|
|
8
|
-
ClusterWizardStepValidationsAlert,
|
|
9
|
-
} from '../../../common';
|
|
10
|
-
import ClusterDeploymentWizardContext from './ClusterDeploymentWizardContext';
|
|
11
|
-
import { ClusterWizardStepHostStatusDeterminationObject } from '../../../common/types/hosts';
|
|
12
|
-
import { ValidationsInfo } from '../../../common/types/clusters';
|
|
13
|
-
import { Cluster } from '@openshift-assisted/types/assisted-installer-service';
|
|
14
|
-
import { ClusterWizardStepsType, wizardStepsValidationsMap } from './wizardTransition';
|
|
15
|
-
import { AgentClusterInstallK8sResource } from '../../types/k8s/agent-cluster-install';
|
|
16
|
-
import { AgentK8sResource } from '../../types/k8s/agent';
|
|
17
|
-
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
18
|
-
import ValidationsRunningAlert from '../common/ValidationsRunningAlert';
|
|
19
|
-
|
|
20
|
-
type ValidationSectionProps = {
|
|
21
|
-
requireProxy?: boolean;
|
|
22
|
-
currentStepId: ClusterWizardStepsType;
|
|
23
|
-
validationsInfo?: ValidationsInfo;
|
|
24
|
-
clusterStatus?: Cluster['status'];
|
|
25
|
-
hosts: ClusterWizardStepHostStatusDeterminationObject[];
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const ValidationSection: React.FC<ValidationSectionProps> = ({
|
|
29
|
-
currentStepId,
|
|
30
|
-
clusterStatus,
|
|
31
|
-
validationsInfo,
|
|
32
|
-
hosts,
|
|
33
|
-
children,
|
|
34
|
-
}) => {
|
|
35
|
-
return (
|
|
36
|
-
<AlertGroup>
|
|
37
|
-
{children}
|
|
38
|
-
{clusterStatus && (
|
|
39
|
-
<ClusterWizardStepValidationsAlert
|
|
40
|
-
currentStepId={currentStepId}
|
|
41
|
-
clusterStatus={clusterStatus}
|
|
42
|
-
hosts={hosts}
|
|
43
|
-
validationsInfo={validationsInfo}
|
|
44
|
-
wizardStepsValidationsMap={wizardStepsValidationsMap}
|
|
45
|
-
>
|
|
46
|
-
<ValidationsRunningAlert />
|
|
47
|
-
</ClusterWizardStepValidationsAlert>
|
|
48
|
-
)}
|
|
49
|
-
</AlertGroup>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
type ClusterDeploymentWizardFooterProps = React.ComponentProps<typeof WizardFooter> &
|
|
54
|
-
WizardFooterGenericProps & {
|
|
55
|
-
agentClusterInstall?: AgentClusterInstallK8sResource;
|
|
56
|
-
agents?: AgentK8sResource[];
|
|
57
|
-
showClusterErrors?: boolean;
|
|
58
|
-
onSyncError?: VoidFunction;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const ClusterDeploymentWizardFooter: React.FC<ClusterDeploymentWizardFooterProps> = ({
|
|
62
|
-
agentClusterInstall,
|
|
63
|
-
agents,
|
|
64
|
-
showClusterErrors,
|
|
65
|
-
children,
|
|
66
|
-
onSyncError,
|
|
67
|
-
isNextDisabled,
|
|
68
|
-
...rest
|
|
69
|
-
}) => {
|
|
70
|
-
const { alerts } = useAlerts();
|
|
71
|
-
const { currentStepId } = React.useContext(ClusterDeploymentWizardContext);
|
|
72
|
-
const clusterStatus = showClusterErrors
|
|
73
|
-
? agentClusterInstall?.status?.debugInfo?.state
|
|
74
|
-
: undefined;
|
|
75
|
-
const validationsInfo = showClusterErrors
|
|
76
|
-
? agentClusterInstall?.status?.validationsInfo
|
|
77
|
-
: undefined;
|
|
78
|
-
const hosts = React.useMemo(
|
|
79
|
-
() =>
|
|
80
|
-
(agents || []).reduce<ClusterWizardStepHostStatusDeterminationObject[]>((result, agent) => {
|
|
81
|
-
const status = agent.status?.debugInfo?.state;
|
|
82
|
-
if (status) {
|
|
83
|
-
result.push({ status, validationsInfo: agent.status?.validationsInfo });
|
|
84
|
-
}
|
|
85
|
-
return result;
|
|
86
|
-
}, []),
|
|
87
|
-
[agents],
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
const syncError = agentClusterInstall?.status?.conditions?.find(
|
|
91
|
-
(c) => c.type === 'SpecSynced' && c.status === 'False',
|
|
92
|
-
)?.message;
|
|
93
|
-
|
|
94
|
-
const { t } = useTranslation();
|
|
95
|
-
React.useEffect(() => {
|
|
96
|
-
if (syncError && onSyncError) {
|
|
97
|
-
onSyncError();
|
|
98
|
-
}
|
|
99
|
-
}, [syncError, onSyncError]);
|
|
100
|
-
|
|
101
|
-
const alertsSection = alerts.length ? <Alerts /> : undefined;
|
|
102
|
-
const errorsSection = (
|
|
103
|
-
<ValidationSection
|
|
104
|
-
currentStepId={currentStepId}
|
|
105
|
-
clusterStatus={clusterStatus}
|
|
106
|
-
validationsInfo={validationsInfo}
|
|
107
|
-
hosts={hosts}
|
|
108
|
-
>
|
|
109
|
-
{syncError && (
|
|
110
|
-
<Alert variant={AlertVariant.danger} title={t('ai:An error occured')} isInline>
|
|
111
|
-
{syncError}
|
|
112
|
-
</Alert>
|
|
113
|
-
)}
|
|
114
|
-
{children}
|
|
115
|
-
</ValidationSection>
|
|
116
|
-
);
|
|
117
|
-
|
|
118
|
-
return (
|
|
119
|
-
<WizardFooter
|
|
120
|
-
alerts={alertsSection}
|
|
121
|
-
errors={errorsSection}
|
|
122
|
-
isNextDisabled={isNextDisabled || !!syncError}
|
|
123
|
-
{...rest}
|
|
124
|
-
/>
|
|
125
|
-
);
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export default ClusterDeploymentWizardFooter;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { WizardNav } from '@patternfly/react-core/deprecated';
|
|
3
|
-
import { WizardNavItem } from '../../../common';
|
|
4
|
-
import { wizardStepNames } from './constants';
|
|
5
|
-
import ClusterDeploymentWizardContext from './ClusterDeploymentWizardContext';
|
|
6
|
-
import { ClusterDeploymentWizardStepsType } from './types';
|
|
7
|
-
import { isCIMFlow } from './helpers';
|
|
8
|
-
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
9
|
-
|
|
10
|
-
const wizardSteps = Object.keys(wizardStepNames) as ClusterDeploymentWizardStepsType[];
|
|
11
|
-
|
|
12
|
-
const ClusterDeploymentWizardNavigation: React.FC<{
|
|
13
|
-
// cluster?: Cluster
|
|
14
|
-
}> = () => {
|
|
15
|
-
const { currentStepId, setCurrentStepId, clusterDeployment } = React.useContext(
|
|
16
|
-
ClusterDeploymentWizardContext,
|
|
17
|
-
);
|
|
18
|
-
const { t } = useTranslation();
|
|
19
|
-
const stepNames = wizardStepNames(t);
|
|
20
|
-
return (
|
|
21
|
-
<WizardNav>
|
|
22
|
-
<WizardNavItem
|
|
23
|
-
key="installation-type"
|
|
24
|
-
content={t('ai:Installation type')}
|
|
25
|
-
step={0}
|
|
26
|
-
isDisabled
|
|
27
|
-
/>
|
|
28
|
-
<WizardNavItem
|
|
29
|
-
key="cluster-details"
|
|
30
|
-
content={stepNames['cluster-details']}
|
|
31
|
-
isCurrent={currentStepId === 'cluster-details'}
|
|
32
|
-
// isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
|
|
33
|
-
isDisabled={false}
|
|
34
|
-
step={1}
|
|
35
|
-
onNavItemClick={() => setCurrentStepId('cluster-details')}
|
|
36
|
-
/>
|
|
37
|
-
<WizardNavItem key="automation" content={t('ai:Automation')} step={2} isDisabled />
|
|
38
|
-
{isCIMFlow(clusterDeployment) ? (
|
|
39
|
-
<WizardNavItem
|
|
40
|
-
key="hosts-selection"
|
|
41
|
-
content={stepNames['hosts-selection']}
|
|
42
|
-
isDisabled={!wizardSteps.slice(1).includes(currentStepId)}
|
|
43
|
-
// isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
|
|
44
|
-
isCurrent={currentStepId === 'hosts-selection'}
|
|
45
|
-
step={2}
|
|
46
|
-
onNavItemClick={() => setCurrentStepId('hosts-selection')}
|
|
47
|
-
/>
|
|
48
|
-
) : (
|
|
49
|
-
<WizardNavItem
|
|
50
|
-
key="hosts-discovery"
|
|
51
|
-
content={stepNames['hosts-discovery']}
|
|
52
|
-
isDisabled={!wizardSteps.slice(1).includes(currentStepId)}
|
|
53
|
-
// isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
|
|
54
|
-
isCurrent={currentStepId === 'hosts-discovery'}
|
|
55
|
-
step={2}
|
|
56
|
-
onNavItemClick={() => setCurrentStepId('hosts-discovery')}
|
|
57
|
-
/>
|
|
58
|
-
)}
|
|
59
|
-
<WizardNavItem
|
|
60
|
-
key="networking"
|
|
61
|
-
content={stepNames['networking']}
|
|
62
|
-
isDisabled={!wizardSteps.slice(2).includes(currentStepId)}
|
|
63
|
-
// isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
|
|
64
|
-
isCurrent={currentStepId === 'networking'}
|
|
65
|
-
step={3}
|
|
66
|
-
onNavItemClick={() => setCurrentStepId('networking')}
|
|
67
|
-
/>
|
|
68
|
-
<WizardNavItem
|
|
69
|
-
key="review"
|
|
70
|
-
content={stepNames['review']}
|
|
71
|
-
isDisabled={!wizardSteps.slice(3).includes(currentStepId)}
|
|
72
|
-
// isValid={ () => !cluster || canNextHostDiscovery({ cluster }) }
|
|
73
|
-
isCurrent={currentStepId === 'review'}
|
|
74
|
-
step={4}
|
|
75
|
-
onNavItemClick={() => setCurrentStepId('review')}
|
|
76
|
-
/>
|
|
77
|
-
</WizardNav>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default ClusterDeploymentWizardNavigation;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ClusterWizardStep } from '../../../common/components/clusterWizard';
|
|
3
|
-
import ClusterDeploymentWizardNavigation from './ClusterDeploymentWizardNavigation';
|
|
4
|
-
|
|
5
|
-
type ClusterDeploymentWizardStepProps = {
|
|
6
|
-
footer: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const ClusterDeploymentWizardStep: React.FC<ClusterDeploymentWizardStepProps> = (props) => (
|
|
10
|
-
<ClusterWizardStep navigation={<ClusterDeploymentWizardNavigation />} {...props} />
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export default ClusterDeploymentWizardStep;
|