@openshift-assisted/ui-lib 2.11.3-cim → 2.12.0-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/modals/CimConfiguration/CimStorageMissingAlert.d.ts.map +1 -1
- package/build/@types/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabMock.d.ts +1 -4
- package/build/@types/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabMock.d.ts.map +1 -1
- package/build/@types/ocm/components/Routes.d.ts +3 -2
- package/build/@types/ocm/components/Routes.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterDetail/AssistedInstallerDetailCard.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardContextProvider.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/ClusterWizardFooter.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterWizard/Operators.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/ClusterBreadcrumbs.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/ClusterPage.d.ts +3 -9
- package/build/@types/ocm/components/clusters/ClusterPage.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/ClusterPageErrors.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/Clusters.d.ts +1 -3
- package/build/@types/ocm/components/clusters/Clusters.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/ClustersListToolbar.d.ts.map +1 -1
- package/build/@types/ocm/components/clusters/NewClusterPage.d.ts +2 -3
- package/build/@types/ocm/components/clusters/NewClusterPage.d.ts.map +1 -1
- package/build/@types/ocm/components/ui/Buttons/BackButton.d.ts +2 -3
- package/build/@types/ocm/components/ui/Buttons/BackButton.d.ts.map +1 -1
- package/build/@types/ocm/store/slices/clusters/selectors.d.ts.map +1 -1
- package/build/cjs/cim/components/Agent/NoAgentsAlert.js +2 -2
- package/build/cjs/cim/components/Agent/NoAgentsAlert.js.map +1 -1
- package/build/cjs/cim/components/Agent/tableUtils.js +3 -3
- package/build/cjs/cim/components/Agent/tableUtils.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/DetailsPage/NodePoolsTable.js +2 -2
- package/build/cjs/cim/components/Hypershift/DetailsPage/NodePoolsTable.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js +2 -2
- package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigProgressAlert.js +3 -3
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigProgressAlert.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimStorageMissingAlert.js +3 -3
- package/build/cjs/cim/components/modals/CimConfiguration/CimStorageMissingAlert.js.map +1 -1
- package/build/cjs/cim/components/modals/MassDeleteAgentModal.js +2 -2
- package/build/cjs/cim/components/modals/MassDeleteAgentModal.js.map +1 -1
- package/build/cjs/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabMock.js.map +1 -1
- package/build/cjs/ocm/components/Routes.js +10 -10
- package/build/cjs/ocm/components/Routes.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js +2 -3
- package/build/cjs/ocm/components/clusterDetail/AssistedInstallerDetailCard.js.map +1 -1
- package/build/cjs/ocm/components/clusterDetail/ClusterDetail.js +5 -5
- package/build/cjs/ocm/components/clusterDetail/ClusterDetail.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +4 -5
- package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js +2 -2
- package/build/cjs/ocm/components/clusterWizard/ClusterDetailsForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js +3 -2
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardContextProvider.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardFooter.js +3 -4
- package/build/cjs/ocm/components/clusterWizard/ClusterWizardFooter.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/Operators.js +6 -4
- package/build/cjs/ocm/components/clusterWizard/Operators.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClusterBreadcrumbs.js +3 -4
- package/build/cjs/ocm/components/clusters/ClusterBreadcrumbs.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClusterPage.js +10 -7
- package/build/cjs/ocm/components/clusters/ClusterPage.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClusterPageErrors.js +1 -2
- package/build/cjs/ocm/components/clusters/ClusterPageErrors.js.map +1 -1
- package/build/cjs/ocm/components/clusters/Clusters.js +6 -5
- package/build/cjs/ocm/components/clusters/Clusters.js.map +1 -1
- package/build/cjs/ocm/components/clusters/ClustersListToolbar.js +3 -4
- package/build/cjs/ocm/components/clusters/ClustersListToolbar.js.map +1 -1
- package/build/cjs/ocm/components/clusters/NewClusterPage.js +1 -1
- package/build/cjs/ocm/components/clusters/NewClusterPage.js.map +1 -1
- package/build/cjs/ocm/components/ui/Buttons/BackButton.js +2 -2
- package/build/cjs/ocm/components/ui/Buttons/BackButton.js.map +1 -1
- package/build/cjs/ocm/store/slices/clusters/selectors.js +2 -3
- package/build/cjs/ocm/store/slices/clusters/selectors.js.map +1 -1
- package/lib/cim/components/Agent/NoAgentsAlert.tsx +1 -1
- package/lib/cim/components/Agent/tableUtils.tsx +1 -1
- package/lib/cim/components/Hypershift/DetailsPage/NodePoolsTable.tsx +1 -1
- package/lib/cim/components/InfraEnv/AddHostDropdown.tsx +1 -1
- package/lib/cim/components/modals/CimConfiguration/CimConfigProgressAlert.tsx +3 -3
- package/lib/cim/components/modals/CimConfiguration/CimStorageMissingAlert.tsx +3 -6
- package/lib/cim/components/modals/MassDeleteAgentModal.tsx +1 -1
- package/lib/ocm/components/HostsClusterDetailTab/HostsClusterDetailTabMock.tsx +1 -5
- package/lib/ocm/components/Routes.tsx +13 -9
- package/lib/ocm/components/clusterDetail/AssistedInstallerDetailCard.tsx +2 -3
- package/lib/ocm/components/clusterDetail/ClusterDetail.tsx +5 -5
- package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +4 -5
- package/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx +1 -1
- package/lib/ocm/components/clusterWizard/ClusterWizardContextProvider.tsx +3 -2
- package/lib/ocm/components/clusterWizard/ClusterWizardFooter.tsx +3 -7
- package/lib/ocm/components/clusterWizard/Operators.tsx +5 -3
- package/lib/ocm/components/clusters/ClusterBreadcrumbs.tsx +2 -3
- package/lib/ocm/components/clusters/ClusterPage.tsx +19 -16
- package/lib/ocm/components/clusters/ClusterPageErrors.tsx +1 -2
- package/lib/ocm/components/clusters/Clusters.tsx +6 -8
- package/lib/ocm/components/clusters/ClustersListToolbar.tsx +3 -4
- package/lib/ocm/components/clusters/NewClusterPage.tsx +4 -6
- package/lib/ocm/components/ui/Buttons/BackButton.tsx +2 -4
- package/lib/ocm/store/slices/clusters/selectors.tsx +2 -3
- package/package.json +4 -4
- package/build/@types/ocm/components/ui/RedirectToCluster.d.ts +0 -8
- package/build/@types/ocm/components/ui/RedirectToCluster.d.ts.map +0 -1
- package/build/cjs/ocm/components/ui/RedirectToCluster.js +0 -14
- package/build/cjs/ocm/components/ui/RedirectToCluster.js.map +0 -1
- package/lib/ocm/components/ui/RedirectToCluster.tsx +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClustersListToolbar.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusters/ClustersListToolbar.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"ClustersListToolbar.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusters/ClustersListToolbar.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,2EAAyD;AACzD,uDAiBgC;AAChC,mFAA+E;AAC/E,+EA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Ae,CAAC,SAAS;oBAEzD,8BAAC,oBAAO,IAAC,OAAO,EAAC,SAAS;wBACxB,8BAAC,oBAAQ,OAAG,CACJ,CACI,CACH,CACA,CACT,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,mBAAmB,CAAC"}
|
|
@@ -14,7 +14,7 @@ const ClusterLoading_1 = tslib_1.__importDefault(require("./ClusterLoading"));
|
|
|
14
14
|
const ClusterPageErrors_1 = require("./ClusterPageErrors");
|
|
15
15
|
const featureSupportLevels_1 = require("../featureSupportLevels");
|
|
16
16
|
const AssistedInstallerHeader_1 = require("./AssistedInstallerHeader");
|
|
17
|
-
const NewClusterPageGeneric = ({ pageTitleSection
|
|
17
|
+
const NewClusterPageGeneric = ({ pageTitleSection }) => {
|
|
18
18
|
return (react_1.default.createElement(common_1.AlertsContextProvider, null,
|
|
19
19
|
react_1.default.createElement(SentryErrorMonitorContextProvider_1.SentryErrorMonitorContextProvider, null,
|
|
20
20
|
react_1.default.createElement(ClusterDefaultConfigurationContext_1.ClusterDefaultConfigurationProvider, { loadingUI: react_1.default.createElement(ClusterLoading_1.default, null), errorUI: react_1.default.createElement(ClusterPageErrors_1.ClusterUiError, null) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewClusterPage.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusters/NewClusterPage.tsx"],"names":[],"mappings":";;;;AAAA,0DAAyC;AACzC,uDAA0E;AAC1E,4CAAwD;AACxD,sFAAsD;AACtD,mHAAiH;AACjH,iGAAiE;AACjE,yHAAyF;AACzF,4FAAyF;AACzF,8EAA8C;AAC9C,2DAAqD;AACrD,kEAAyE;AACzE,uEAAoE;AAEpE,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"NewClusterPage.js","sourceRoot":"","sources":["../../../../../lib/ocm/components/clusters/NewClusterPage.tsx"],"names":[],"mappings":";;;;AAAA,0DAAyC;AACzC,uDAA0E;AAC1E,4CAAwD;AACxD,sFAAsD;AACtD,mHAAiH;AACjH,iGAAiE;AACjE,yHAAyF;AACzF,4FAAyF;AACzF,8EAA8C;AAC9C,2DAAqD;AACrD,kEAAyE;AACzE,uEAAoE;AAEpE,MAAM,qBAAqB,GAAG,CAAC,EAAE,gBAAgB,EAAoC,EAAE,EAAE;IACvF,OAAO,CACL,8BAAC,8BAAqB;QACpB,8BAAC,qEAAiC;YAChC,8BAAC,wEAAmC,IAClC,SAAS,EAAE,8BAAC,wBAAc,OAAG,EAC7B,OAAO,EAAE,8BAAC,kCAAc,OAAG;gBAE3B,8BAAC,qDAA8B,IAAC,SAAS,EAAE,8BAAC,wBAAc,OAAG;oBAC1D,gBAAgB;oBACjB,8BAAC,wBAAW,IAAC,OAAO,EAAE,gCAAmB,CAAC,KAAK,EAAE,QAAQ;wBACvD,8BAAC,sCAA4B;4BAC3B,8BAAC,0BAAgB,OAAG,CACS,CACnB,CACiB,CACG,CACJ,CACd,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC,CACnC;IACE,8BAAC,4BAAkB,IAAC,WAAW,EAAC,aAAa,GAAG;IAChD,8BAAC,wBAAW,IAAC,OAAO,EAAE,gCAAmB,CAAC,KAAK;QAC7C,8BAAC,iDAAuB,OAAG,CACf,CACb,CACJ,CAAC;AAEK,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,8BAAC,qBAAqB,OAAG,CAAC;AAAvD,QAAA,oBAAoB,wBAAmC;AAC7D,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,CAClC,8BAAC,qBAAqB,IAAC,gBAAgB,EAAE,8BAAC,sBAAsB,OAAG,GAAI,CACxE,CAAC;AAFW,QAAA,cAAc,kBAEzB"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BackButton = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const react_router_dom_v5_compat_1 = require("react-router-dom-v5-compat");
|
|
6
6
|
const react_core_1 = require("@patternfly/react-core");
|
|
7
7
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
8
|
-
const BackButton = ({ to, variant = 'secondary' }) => (react_1.default.createElement(react_core_1.Button, { variant: variant, component: (props) => react_1.default.createElement(
|
|
8
|
+
const BackButton = ({ to, variant = 'secondary' }) => (react_1.default.createElement(react_core_1.Button, { variant: variant, component: (props) => react_1.default.createElement(react_router_dom_v5_compat_1.Link, Object.assign({ to: to }, props)) }, "Back"));
|
|
9
9
|
exports.BackButton = BackButton;
|
|
10
10
|
//# sourceMappingURL=BackButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackButton.js","sourceRoot":"","sources":["../../../../../../lib/ocm/components/ui/Buttons/BackButton.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"BackButton.js","sourceRoot":"","sources":["../../../../../../lib/ocm/components/ui/Buttons/BackButton.tsx"],"names":[],"mappings":";;;;AAAA,2EAA6D;AAE7D,uDAAgD;AAChD,0DAA0B;AAMnB,MAAM,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,OAAO,GAAG,WAAW,EAAmB,EAAE,EAAE,CAAC,CAC5E,8BAAC,mBAAM,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,8BAAC,iCAAI,kBAAC,EAAE,EAAE,EAAE,IAAM,KAAK,EAAI,WAElE,CACV,CAAC;AAJW,QAAA,UAAU,cAIrB"}
|
|
@@ -4,10 +4,9 @@ exports.selectClusterNames = exports.selectClusterTableRows = exports.getCluster
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
|
-
const
|
|
7
|
+
const react_router_dom_v5_compat_1 = require("react-router-dom-v5-compat");
|
|
8
8
|
const common_1 = require("../../../../common");
|
|
9
9
|
const ClusterStatus_1 = tslib_1.__importStar(require("../../../components/clusters/ClusterStatus"));
|
|
10
|
-
const config_1 = require("../../../config");
|
|
11
10
|
const selectClusters = (state) => state.clusters.data;
|
|
12
11
|
const clustersUIState = (state) => state.clusters.uiState;
|
|
13
12
|
exports.selectClustersUIState = (0, toolkit_1.createSelector)([selectClusters, clustersUIState], (clusters, uiState) => {
|
|
@@ -30,7 +29,7 @@ const clusterToClusterTableRow = (cluster, t) => {
|
|
|
30
29
|
return {
|
|
31
30
|
cells: [
|
|
32
31
|
{
|
|
33
|
-
title: (react_1.default.createElement(
|
|
32
|
+
title: (react_1.default.createElement(react_router_dom_v5_compat_1.Link, { key: name, to: id, id: `cluster-link-${id}` }, name)),
|
|
34
33
|
props: { 'data-testid': `cluster-name-${name}` },
|
|
35
34
|
sortableValue: name,
|
|
36
35
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../../../../lib/ocm/store/slices/clusters/selectors.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,8CAAkD;AAElD,
|
|
1
|
+
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../../../../lib/ocm/store/slices/clusters/selectors.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,8CAAkD;AAElD,2EAAkD;AAElD,+CAQ4B;AAE5B,oGAAiG;AAIjG,MAAM,cAAc,GAAG,CAAC,KAAoB,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;AACrE,MAAM,eAAe,GAAG,CAAC,KAAoB,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC;AAE5D,QAAA,qBAAqB,GAAG,IAAA,wBAAc,EACjD,CAAC,cAAc,EAAE,eAAe,CAAC,EACjC,CAAC,QAAQ,EAAE,OAAO,EAAmB,EAAE;IACrC,MAAM,EAAE,MAAM,EAAE,K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AC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAC5B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Alert, AlertVariant, List, ListComponent, ListItem } from '@patternfly/react-core';
|
|
3
|
-
import { Link } from 'react-router-dom';
|
|
3
|
+
import { Link } from 'react-router-dom-v5-compat';
|
|
4
4
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
5
5
|
import { Trans } from 'react-i18next';
|
|
6
6
|
import { CpuArchitecture } from '../../../common';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
2
|
+
import { Link } from 'react-router-dom-v5-compat';
|
|
3
3
|
import { Button, Label, Popover, Stack, StackItem } from '@patternfly/react-core';
|
|
4
4
|
import { PlusCircleIcon } from '@patternfly/react-icons/dist/js/icons/plus-circle-icon';
|
|
5
5
|
import {
|
|
@@ -16,7 +16,7 @@ import { AddHostDropdownProps } from './types';
|
|
|
16
16
|
import './AddHostDropdown.css';
|
|
17
17
|
import { PopoverIcon } from '../../../common';
|
|
18
18
|
import { Trans } from 'react-i18next';
|
|
19
|
-
import { Link } from 'react-router-dom';
|
|
19
|
+
import { Link } from 'react-router-dom-v5-compat';
|
|
20
20
|
|
|
21
21
|
type ModalType = 'iso' | 'bmc' | 'yaml' | 'ipxe' | undefined;
|
|
22
22
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useNavigate } from 'react-router-dom-v5-compat';
|
|
3
3
|
import {
|
|
4
4
|
Alert,
|
|
5
5
|
AlertVariant,
|
|
@@ -26,7 +26,7 @@ export const CimConfigProgressAlert: React.FC<CimConfigProgressAlertProps> = ({
|
|
|
26
26
|
assistedServiceDeploymentUrl,
|
|
27
27
|
}) => {
|
|
28
28
|
const { t } = useTranslation();
|
|
29
|
-
const
|
|
29
|
+
const navigate = useNavigate();
|
|
30
30
|
const [hideSuccess, setHideSuccess] = React.useState(true);
|
|
31
31
|
|
|
32
32
|
React.useEffect(
|
|
@@ -68,7 +68,7 @@ export const CimConfigProgressAlert: React.FC<CimConfigProgressAlertProps> = ({
|
|
|
68
68
|
variant={ButtonVariant.link}
|
|
69
69
|
isInline
|
|
70
70
|
key="assisted-service-deployment"
|
|
71
|
-
onClick={() =>
|
|
71
|
+
onClick={() => navigate(assistedServiceDeploymentUrl)}
|
|
72
72
|
>
|
|
73
73
|
{t('ai:Troubleshoot in the assisted service deployment')} <ExternalLinkAltIcon />
|
|
74
74
|
</Button>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useNavigate } from 'react-router-dom-v5-compat';
|
|
3
3
|
import { Alert, AlertActionLink, AlertVariant } from '@patternfly/react-core';
|
|
4
4
|
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ export const CimStorageMissingAlert: React.FC<{
|
|
|
10
10
|
storageOperatorUrl: string;
|
|
11
11
|
}> = ({ docStorageUrl, storageOperatorUrl }) => {
|
|
12
12
|
const { t } = useTranslation();
|
|
13
|
-
const
|
|
13
|
+
const navigate = useNavigate();
|
|
14
14
|
|
|
15
15
|
const contentWorkaround = (
|
|
16
16
|
<>
|
|
@@ -20,10 +20,7 @@ export const CimStorageMissingAlert: React.FC<{
|
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
const actionLinks: React.ReactNode[] = [
|
|
23
|
-
<AlertActionLink
|
|
24
|
-
key="install-storage-operator"
|
|
25
|
-
onClick={() => history.push(storageOperatorUrl)}
|
|
26
|
-
>
|
|
23
|
+
<AlertActionLink key="install-storage-operator" onClick={() => navigate(storageOperatorUrl)}>
|
|
27
24
|
{t('ai:Install storage operator')}
|
|
28
25
|
</AlertActionLink>,
|
|
29
26
|
<AlertActionLink key="storage-class" onClick={() => window.open(docStorageUrl, '_blank')}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Button, Flex, FlexItem, Popover } from '@patternfly/react-core';
|
|
3
3
|
import { InfoCircleIcon } from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
4
|
-
import { Link } from 'react-router-dom';
|
|
4
|
+
import { Link } from 'react-router-dom-v5-compat';
|
|
5
5
|
import { sortable } from '@patternfly/react-table';
|
|
6
6
|
import { global_palette_blue_300 as blueInfoColor } from '@patternfly/react-tokens/dist/js/global_palette_blue_300';
|
|
7
7
|
import {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RouteComponentProps } from 'react-router-dom';
|
|
3
2
|
import {
|
|
4
3
|
ButtonVariant,
|
|
5
4
|
EmptyState,
|
|
@@ -9,7 +8,6 @@ import {
|
|
|
9
8
|
PageSectionVariants,
|
|
10
9
|
Title,
|
|
11
10
|
} from '@patternfly/react-core';
|
|
12
|
-
import { HostsClusterDetailTabProps } from './types';
|
|
13
11
|
import {
|
|
14
12
|
OcmCpuArchitecture,
|
|
15
13
|
STANDALONE_DEPLOYMENT_ENABLED_FEATURES,
|
|
@@ -43,9 +41,7 @@ const getCluster = (type: string) => {
|
|
|
43
41
|
}
|
|
44
42
|
};
|
|
45
43
|
|
|
46
|
-
export const HostsClusterDetailTabMock
|
|
47
|
-
RouteComponentProps & HostsClusterDetailTabProps
|
|
48
|
-
> = () => {
|
|
44
|
+
export const HostsClusterDetailTabMock = () => {
|
|
49
45
|
const [tabShown, setTabShown] = React.useState<string>('');
|
|
50
46
|
const [isMocked, setIsMocked] = React.useState<boolean>(false);
|
|
51
47
|
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Provider } from 'react-redux';
|
|
3
|
-
import {
|
|
3
|
+
import { Routes, Route, Navigate, Outlet } from 'react-router-dom-v5-compat';
|
|
4
4
|
import { Clusters, ClusterPage, NewClusterPage } from './clusters';
|
|
5
5
|
import type { FeatureListType } from '../../common/features/featureGate';
|
|
6
|
-
import { routeBasePath } from '../config';
|
|
7
6
|
import { AssistedUILibVersion } from './ui';
|
|
8
7
|
import { storeDay1 } from '../store';
|
|
9
8
|
import { useFeatureDetection } from '../hooks/use-feature-detection';
|
|
10
9
|
|
|
11
|
-
export const
|
|
10
|
+
export const UILibRoutes = ({
|
|
12
11
|
allEnabledFeatures,
|
|
13
12
|
children,
|
|
13
|
+
}: {
|
|
14
|
+
allEnabledFeatures: FeatureListType;
|
|
15
|
+
children: React.ReactNode;
|
|
14
16
|
}) => {
|
|
15
17
|
useFeatureDetection(allEnabledFeatures);
|
|
16
18
|
|
|
17
19
|
return (
|
|
18
20
|
<Provider store={storeDay1}>
|
|
19
21
|
<AssistedUILibVersion />
|
|
20
|
-
<
|
|
21
|
-
<Route path=
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
<Routes>
|
|
23
|
+
<Route path="clusters" element={<Outlet />}>
|
|
24
|
+
<Route path="~new" element={<NewClusterPage />} />
|
|
25
|
+
<Route path=":clusterId" element={<ClusterPage />} />
|
|
26
|
+
<Route index element={<Clusters />} />
|
|
27
|
+
</Route>
|
|
24
28
|
{children}
|
|
25
|
-
<
|
|
26
|
-
</
|
|
29
|
+
<Route path="*" element={<Navigate to="clusters" />} />
|
|
30
|
+
</Routes>
|
|
27
31
|
</Provider>
|
|
28
32
|
);
|
|
29
33
|
};
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { Provider } from 'react-redux';
|
|
3
3
|
import { Card, CardBody, CardHeader, Title } from '@patternfly/react-core';
|
|
4
4
|
import { storeDay1 } from '../../store';
|
|
5
|
-
import { OCM_CLUSTER_LIST_LINK } from '../../config';
|
|
6
5
|
import {
|
|
7
6
|
AlertsContextProvider,
|
|
8
7
|
AssistedInstallerOCMPermissionTypesListType,
|
|
@@ -62,7 +61,7 @@ const ClusterLoadFailed = ({ clusterId, error }: { clusterId: Cluster['id']; err
|
|
|
62
61
|
<ErrorState
|
|
63
62
|
title="Failed to fetch the cluster"
|
|
64
63
|
fetchData={fetchCluster}
|
|
65
|
-
actions={[<BackButton key={'cancel'} to={
|
|
64
|
+
actions={[<BackButton key={'cancel'} to={'..'} />]}
|
|
66
65
|
content={error}
|
|
67
66
|
/>
|
|
68
67
|
</CardBody>
|
|
@@ -80,7 +79,7 @@ const LoadingDefaultConfigFailedCard = () => (
|
|
|
80
79
|
<CardBody>
|
|
81
80
|
<ErrorState
|
|
82
81
|
title="Failed to retrieve the default configuration"
|
|
83
|
-
actions={[<BackButton key={'cancel'} to={
|
|
82
|
+
actions={[<BackButton key={'cancel'} to={'..'} />]}
|
|
84
83
|
/>
|
|
85
84
|
</CardBody>
|
|
86
85
|
</Card>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useNavigate } from 'react-router-dom-v5-compat';
|
|
3
3
|
import {
|
|
4
4
|
Stack,
|
|
5
5
|
StackItem,
|
|
@@ -40,7 +40,7 @@ const ClusterDetail: React.FC<ClusterDetailProps> = ({ cluster }) => {
|
|
|
40
40
|
const isSNOExpansionAllowed =
|
|
41
41
|
featureSupportLevelContext.isFeatureSupported('SINGLE_NODE_EXPANSION');
|
|
42
42
|
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
|
|
43
|
-
const
|
|
43
|
+
const navigate = useNavigate();
|
|
44
44
|
const canAddHosts =
|
|
45
45
|
(!isSNO(cluster) || isSNOExpansionAllowed) && cluster.status === 'installed' && !isInOcm;
|
|
46
46
|
|
|
@@ -49,13 +49,13 @@ const ClusterDetail: React.FC<ClusterDetailProps> = ({ cluster }) => {
|
|
|
49
49
|
try {
|
|
50
50
|
const { data } = await ClustersAPI.allowAddHosts(cluster.id);
|
|
51
51
|
updateCluster(data);
|
|
52
|
-
|
|
52
|
+
navigate(`${routeBasePath}/clusters/${cluster.id}`);
|
|
53
53
|
} catch (e) {
|
|
54
54
|
handleApiError(e);
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
void doItAsync();
|
|
58
|
-
}, [cluster.id,
|
|
58
|
+
}, [cluster.id, navigate]);
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
61
|
<Stack hasGutter>
|
|
@@ -112,7 +112,7 @@ const ClusterDetail: React.FC<ClusterDetailProps> = ({ cluster }) => {
|
|
|
112
112
|
{!isSingleClusterFeatureEnabled && (
|
|
113
113
|
<ToolbarButton
|
|
114
114
|
variant={ButtonVariant.link}
|
|
115
|
-
onClick={() =>
|
|
115
|
+
onClick={() => navigate('..')}
|
|
116
116
|
id={getClusterDetailId('button-back-to-all-clusters')}
|
|
117
117
|
>
|
|
118
118
|
Back to all clusters
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useNavigate } from 'react-router-dom-v5-compat';
|
|
3
3
|
import { useDispatch } from 'react-redux';
|
|
4
4
|
import { useAlerts, LoadingState, ClusterWizardStep, ErrorState } from '../../../common';
|
|
5
5
|
import { usePullSecret } from '../../hooks';
|
|
@@ -10,7 +10,6 @@ import { canNextClusterDetails, ClusterWizardFlowStateNew } from './wizardTransi
|
|
|
10
10
|
import { useOpenshiftVersions, useManagedDomains, useUsedClusterNames } from '../../hooks';
|
|
11
11
|
import ClusterDetailsForm from './ClusterDetailsForm';
|
|
12
12
|
import ClusterWizardNavigation from './ClusterWizardNavigation';
|
|
13
|
-
import { routeBasePath } from '../../config';
|
|
14
13
|
import {
|
|
15
14
|
ClusterDetailsUpdateParams,
|
|
16
15
|
ClustersService,
|
|
@@ -28,7 +27,7 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
28
27
|
const clusterWizardContext = useClusterWizardContext();
|
|
29
28
|
const managedDomains = useManagedDomains();
|
|
30
29
|
const { addAlert, clearAlerts } = useAlerts();
|
|
31
|
-
const
|
|
30
|
+
const navigate = useNavigate();
|
|
32
31
|
const dispatch = useDispatch();
|
|
33
32
|
const { usedClusterNames } = useUsedClusterNames(cluster?.id || '');
|
|
34
33
|
const pullSecret = usePullSecret();
|
|
@@ -69,7 +68,7 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
69
68
|
clearAlerts();
|
|
70
69
|
try {
|
|
71
70
|
const cluster = await ClustersService.create(params);
|
|
72
|
-
|
|
71
|
+
navigate(`../${cluster.id}`, { state: ClusterWizardFlowStateNew });
|
|
73
72
|
await UISettingService.update(cluster.id, { addCustomManifests });
|
|
74
73
|
} catch (e) {
|
|
75
74
|
handleApiError(e, () =>
|
|
@@ -80,7 +79,7 @@ const ClusterDetails = ({ cluster, infraEnv }: ClusterDetailsProps) => {
|
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
},
|
|
83
|
-
[clearAlerts,
|
|
82
|
+
[clearAlerts, navigate, addAlert, dispatch],
|
|
84
83
|
);
|
|
85
84
|
|
|
86
85
|
const navigation = <ClusterWizardNavigation cluster={cluster} />;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
|
-
import { useLocation } from 'react-router-dom';
|
|
3
|
+
import { useLocation } from 'react-router-dom-v5-compat';
|
|
4
4
|
import { Grid, GridItem } from '@patternfly/react-core';
|
|
5
5
|
import isUndefined from 'lodash-es/isUndefined.js';
|
|
6
6
|
import { Formik, FormikHelpers } from 'formik';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { useLocation } from 'react-router-dom';
|
|
2
|
+
import { useLocation } from 'react-router-dom-v5-compat';
|
|
3
3
|
import { ClusterWizardContextType, ClusterWizardContext } from './ClusterWizardContext';
|
|
4
4
|
import {
|
|
5
5
|
ClusterWizardFlowStateType,
|
|
@@ -91,7 +91,8 @@ const ClusterWizardContextProvider = ({
|
|
|
91
91
|
const [wizardStepIds, setWizardStepIds] = React.useState<ClusterWizardStepsType[]>();
|
|
92
92
|
const [wizardPerPage, setWizardPerPage] = React.useState(10);
|
|
93
93
|
const [customManifestsStep, setCustomManifestsStep] = React.useState<boolean>(false);
|
|
94
|
-
const
|
|
94
|
+
const location = useLocation();
|
|
95
|
+
const locationState = location.state as ClusterWizardFlowStateType | undefined;
|
|
95
96
|
const {
|
|
96
97
|
uiSettings,
|
|
97
98
|
updateUISettings,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useNavigate } from 'react-router-dom-v5-compat';
|
|
3
3
|
import { Alert, AlertGroup, AlertVariant } from '@patternfly/react-core';
|
|
4
4
|
import {
|
|
5
5
|
WizardFooter,
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
clusterFieldLabels,
|
|
10
10
|
selectClusterValidationsInfo,
|
|
11
11
|
} from '../../../common';
|
|
12
|
-
import { routeBasePath } from '../../config';
|
|
13
12
|
import { wizardStepsValidationsMap } from './wizardTransition';
|
|
14
13
|
import { useClusterWizardContext } from './ClusterWizardContext';
|
|
15
14
|
import ClusterWizardStepValidationsAlert from '../../../common/components/clusterWizard/ClusterWizardStepValidationsAlert';
|
|
@@ -79,12 +78,9 @@ const ClusterWizardFooter = ({
|
|
|
79
78
|
...rest
|
|
80
79
|
}: ClusterWizardFooterProps) => {
|
|
81
80
|
const { alerts } = useAlerts();
|
|
82
|
-
const
|
|
81
|
+
const navigate = useNavigate();
|
|
83
82
|
|
|
84
|
-
const handleCancel = React.useCallback(
|
|
85
|
-
() => history.push(`${routeBasePath}/clusters/`),
|
|
86
|
-
[history],
|
|
87
|
-
);
|
|
83
|
+
const handleCancel = React.useCallback(() => navigate('..'), [navigate]);
|
|
88
84
|
|
|
89
85
|
const alertsSection = alerts.length ? <Alerts /> : undefined;
|
|
90
86
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useDispatch } from 'react-redux';
|
|
3
|
-
import {
|
|
3
|
+
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
|
|
4
4
|
import { Formik, FormikConfig, useFormikContext } from 'formik';
|
|
5
5
|
import {
|
|
6
6
|
ClusterWizardStep,
|
|
@@ -42,7 +42,7 @@ const OperatorsForm = ({ cluster }: { cluster: Cluster }) => {
|
|
|
42
42
|
const clusterWizardContext = useClusterWizardContext();
|
|
43
43
|
const isAutoSaveRunning = useFormikAutoSave();
|
|
44
44
|
const { errors, touched, isSubmitting, isValid } = useFormikContext<OperatorsValues>();
|
|
45
|
-
const
|
|
45
|
+
const navigate = useNavigate();
|
|
46
46
|
const { pathname } = useLocation();
|
|
47
47
|
|
|
48
48
|
const isNextDisabled =
|
|
@@ -53,7 +53,9 @@ const OperatorsForm = ({ cluster }: { cluster: Cluster }) => {
|
|
|
53
53
|
!canNextOperators({ cluster });
|
|
54
54
|
|
|
55
55
|
const handleNext = () => {
|
|
56
|
-
|
|
56
|
+
if (window.location.pathname.indexOf('assisted-installer') > -1) {
|
|
57
|
+
navigate(pathname, { state: undefined, replace: true });
|
|
58
|
+
}
|
|
57
59
|
clusterWizardContext.moveNext();
|
|
58
60
|
};
|
|
59
61
|
|
|
@@ -5,8 +5,7 @@ import {
|
|
|
5
5
|
BreadcrumbItem,
|
|
6
6
|
PageSection,
|
|
7
7
|
} from '@patternfly/react-core';
|
|
8
|
-
import { Link } from 'react-router-dom';
|
|
9
|
-
import { routeBasePath } from '../../config';
|
|
8
|
+
import { Link } from 'react-router-dom-v5-compat';
|
|
10
9
|
import { isInOcm } from '../../../common/api';
|
|
11
10
|
|
|
12
11
|
const ClusterBreadcrumbs = ({ clusterName }: { clusterName?: string }) => (
|
|
@@ -18,7 +17,7 @@ const ClusterBreadcrumbs = ({ clusterName }: { clusterName?: string }) => (
|
|
|
18
17
|
</BreadcrumbItem>
|
|
19
18
|
{clusterName ? (
|
|
20
19
|
<BreadcrumbItem>
|
|
21
|
-
<Link to={
|
|
20
|
+
<Link to={`..`}>Assisted Clusters</Link>
|
|
22
21
|
</BreadcrumbItem>
|
|
23
22
|
) : (
|
|
24
23
|
<BreadcrumbItem isActive>Assisted Clusters</BreadcrumbItem>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useParams, Navigate } from 'react-router-dom-v5-compat';
|
|
3
3
|
import { useDispatch } from 'react-redux';
|
|
4
4
|
import { PageSection, PageSectionVariants, Text, TextContent } from '@patternfly/react-core';
|
|
5
5
|
import {
|
|
@@ -34,13 +34,12 @@ import { usePullSecret } from '../../hooks';
|
|
|
34
34
|
import { Cluster, InfraEnv } from '@openshift-assisted/types/assisted-installer-service';
|
|
35
35
|
import { AssistedInstallerHeader } from './AssistedInstallerHeader';
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
clusterId: string;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const ClusterPageGeneric: React.FC<{ clusterId: string; showBreadcrumbs?: boolean }> = ({
|
|
37
|
+
const ClusterPageGeneric = ({
|
|
42
38
|
clusterId,
|
|
43
39
|
showBreadcrumbs = false,
|
|
40
|
+
}: {
|
|
41
|
+
clusterId: string;
|
|
42
|
+
showBreadcrumbs?: boolean;
|
|
44
43
|
}) => {
|
|
45
44
|
if (!clusterId) {
|
|
46
45
|
// console.error('ClusterPageGeneric: missing clusterId');
|
|
@@ -129,7 +128,7 @@ const ClusterPageGeneric: React.FC<{ clusterId: string; showBreadcrumbs?: boolea
|
|
|
129
128
|
|
|
130
129
|
if (uiState === ResourceUIState.POLLING_ERROR && !cluster) {
|
|
131
130
|
if (Number(errorDetail?.code) === 404) {
|
|
132
|
-
return <
|
|
131
|
+
return <Navigate to={`${routeBasePath}/clusters`} />;
|
|
133
132
|
}
|
|
134
133
|
return (
|
|
135
134
|
<PageSection variant={PageSectionVariants.light} isFilled>
|
|
@@ -138,7 +137,7 @@ const ClusterPageGeneric: React.FC<{ clusterId: string; showBreadcrumbs?: boolea
|
|
|
138
137
|
fetchData={
|
|
139
138
|
Number(errorDetail?.code) === 401 ? () => window.location.reload() : fetchCluster
|
|
140
139
|
}
|
|
141
|
-
actions={[<BackButton key={'cancel'} to={
|
|
140
|
+
actions={[<BackButton key={'cancel'} to={'..'} />]}
|
|
142
141
|
/>
|
|
143
142
|
</PageSection>
|
|
144
143
|
);
|
|
@@ -149,7 +148,7 @@ const ClusterPageGeneric: React.FC<{ clusterId: string; showBreadcrumbs?: boolea
|
|
|
149
148
|
<PageSection variant={PageSectionVariants.light} isFilled>
|
|
150
149
|
<ErrorState
|
|
151
150
|
title="Cluster details not found"
|
|
152
|
-
actions={[<BackButton key={'cancel'} to={
|
|
151
|
+
actions={[<BackButton key={'cancel'} to={`..`} />]}
|
|
153
152
|
content={
|
|
154
153
|
'Check to make sure the cluster-ID is valid. Otherwise, the cluster details may have been deleted.'
|
|
155
154
|
}
|
|
@@ -193,16 +192,20 @@ const ClusterPageGeneric: React.FC<{ clusterId: string; showBreadcrumbs?: boolea
|
|
|
193
192
|
);
|
|
194
193
|
}
|
|
195
194
|
|
|
196
|
-
return <
|
|
195
|
+
return <Navigate to="/clusters" />;
|
|
197
196
|
};
|
|
198
197
|
|
|
199
|
-
export const SingleClusterPage
|
|
198
|
+
export const SingleClusterPage = ({ clusterId }: { clusterId: string }) => (
|
|
200
199
|
<AlertsContextProvider>
|
|
201
200
|
<ClusterPageGeneric clusterId={clusterId} />
|
|
202
201
|
</AlertsContextProvider>
|
|
203
202
|
);
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
203
|
+
|
|
204
|
+
export const ClusterPage = () => {
|
|
205
|
+
const { clusterId } = useParams<{ clusterId: string }>();
|
|
206
|
+
return (
|
|
207
|
+
<AlertsContextProvider>
|
|
208
|
+
<ClusterPageGeneric clusterId={clusterId || ''} showBreadcrumbs />
|
|
209
|
+
</AlertsContextProvider>
|
|
210
|
+
);
|
|
211
|
+
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PageSection, PageSectionVariants } from '@patternfly/react-core';
|
|
3
3
|
import { ErrorState } from '../../../common';
|
|
4
|
-
import { routeBasePath } from '../../config';
|
|
5
4
|
import { BackButton } from '../ui/Buttons/BackButton';
|
|
6
5
|
|
|
7
6
|
export const ClusterUiError = () => (
|
|
8
7
|
<PageSection variant={PageSectionVariants.light} isFilled>
|
|
9
8
|
<ErrorState
|
|
10
9
|
title="Failed to retrieve the default configuration"
|
|
11
|
-
actions={[<BackButton key={'cancel'} to={
|
|
10
|
+
actions={[<BackButton key={'cancel'} to={'..'} />]}
|
|
12
11
|
/>
|
|
13
12
|
</PageSection>
|
|
14
13
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useNavigate } from 'react-router-dom-v5-compat';
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
5
|
ButtonVariant,
|
|
@@ -22,7 +22,6 @@ import ClustersTable from './ClustersTable';
|
|
|
22
22
|
import { fetchClustersAsync, deleteCluster } from '../../store/slices/clusters/slice';
|
|
23
23
|
import { handleApiError, getApiErrorMessage } from '../../../common/api';
|
|
24
24
|
import ClusterBreadcrumbs from './ClusterBreadcrumbs';
|
|
25
|
-
import { routeBasePath } from '../../config';
|
|
26
25
|
import { ClustersService } from '../../services';
|
|
27
26
|
import { useTranslation } from '../../../common/hooks/use-translation-wrapper';
|
|
28
27
|
import ClusterPollingErrorModal from '../clusterDetail/ClusterPollingErrorModal';
|
|
@@ -33,9 +32,8 @@ import {
|
|
|
33
32
|
selectClusterTableRows,
|
|
34
33
|
} from '../../store/slices/clusters/selectors';
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const Clusters: React.FC<ClustersProps> = ({ history }) => {
|
|
35
|
+
const Clusters = () => {
|
|
36
|
+
const navigate = useNavigate();
|
|
39
37
|
const { LOADING, EMPTY, POLLING_ERROR, RELOADING } = ResourceUIState;
|
|
40
38
|
const { addAlert } = useAlerts();
|
|
41
39
|
const { t } = useTranslation();
|
|
@@ -85,7 +83,7 @@ const Clusters: React.FC<ClustersProps> = ({ history }) => {
|
|
|
85
83
|
primaryAction={
|
|
86
84
|
<Button
|
|
87
85
|
variant={ButtonVariant.primary}
|
|
88
|
-
onClick={() =>
|
|
86
|
+
onClick={() => navigate(`~new`)}
|
|
89
87
|
id="empty-state-new-cluster-button"
|
|
90
88
|
data-ouia-id="button-create-new-cluster"
|
|
91
89
|
>
|
|
@@ -129,9 +127,9 @@ const Clusters: React.FC<ClustersProps> = ({ history }) => {
|
|
|
129
127
|
}
|
|
130
128
|
};
|
|
131
129
|
|
|
132
|
-
const ClustersPage
|
|
130
|
+
const ClustersPage = () => (
|
|
133
131
|
<AlertsContextProvider>
|
|
134
|
-
<Clusters
|
|
132
|
+
<Clusters />
|
|
135
133
|
</AlertsContextProvider>
|
|
136
134
|
);
|
|
137
135
|
|