Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
"react-i18next": "^15.1.0",
"react-joyride": "^2.9.3",
"react-redux": "^8.0.5",
"react-router-dom": "5.3.x",
"react-router-dom-v5-compat": "^6.11.2",
"react-router": "^6.30.1",
"react-router-dom": "^6.30.1",
"rxjs": "^7.8.1",
"semver": "^7.6.0",
"showdown": "^2.1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/app/AppLayout/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ import {
import _ from 'lodash';
import * as React from 'react';
import { Trans } from 'react-i18next';
import { matchPath, NavLink, useLocation, useNavigate } from 'react-router-dom-v5-compat';
import { matchPath, NavLink, useLocation, useNavigate } from 'react-router-dom';
import { map } from 'rxjs/operators';
import { LogoutIcon } from './LogoutIcon';
import { ThemeToggle } from './ThemeToggle';
Expand Down
2 changes: 1 addition & 1 deletion src/app/AppLayout/SslErrorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { portalRoot, toPath } from '@app/utils/utils';
import { Button, Modal, ModalVariant, Text } from '@patternfly/react-core';
import * as React from 'react';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';

export interface SslErrorModalProps {
visible: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/app/Archives/Archives.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
} from '@patternfly/react-core';
import { SearchIcon } from '@patternfly/react-icons';
import * as React from 'react';
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
import { useLocation, useNavigate } from 'react-router-dom';
import { of } from 'rxjs';
import { AllArchivedRecordingsTable } from './AllArchivedRecordingsTable';
import { AllTargetsArchivedRecordingsTable } from './AllTargetsArchivedRecordingsTable';
Expand Down
4 changes: 2 additions & 2 deletions src/app/BreadcrumbPage/BreadcrumbPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CryostatLink } from '@app/Shared/Components/CryostatLink';
import {
Breadcrumb,
BreadcrumbHeading,
Expand All @@ -23,7 +24,6 @@ import {
StackItem,
} from '@patternfly/react-core';
import * as React from 'react';
import { Link } from 'react-router-dom-v5-compat';
import { BreadcrumbTrail } from './types';
import { isItemFilled } from './utils';

Expand All @@ -40,7 +40,7 @@ export const BreadcrumbPage: React.FC<BreadcrumbPageProps> = ({ pageTitle, bread
<Breadcrumb>
{(breadcrumbs || []).map(({ title, path }) => (
<BreadcrumbItem key={path}>
<Link to={path}>{title}</Link>
<CryostatLink to={path}>{title}</CryostatLink>
</BreadcrumbItem>
))}
<BreadcrumbHeading>{pageTitle}</BreadcrumbHeading>
Expand Down
2 changes: 1 addition & 1 deletion src/app/CreateRecording/CustomRecordingForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import {
import { HelpIcon } from '@patternfly/react-icons';
import * as React from 'react';
import { Trans } from 'react-i18next';
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
import { useLocation, useNavigate } from 'react-router-dom';
import { forkJoin } from 'rxjs';
import { first } from 'rxjs/operators';
import { EventTemplateIdentifier, CustomRecordingFormData } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/app/CreateRecording/SnapshotRecordingForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { ServiceContext } from '@app/Shared/Services/Services';
import { useSubscriptions } from '@app/utils/hooks/useSubscriptions';
import { ActionGroup, Button, Form, Text, TextContent, TextVariants } from '@patternfly/react-core';
import * as React from 'react';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';
import { first } from 'rxjs';

export interface SnapshotRecordingFormProps {}
Expand Down
2 changes: 1 addition & 1 deletion src/app/Dashboard/Charts/jfr/JFRMetricsChartCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
import { DataSourceIcon, ExternalLinkAltIcon, SyncAltIcon, TachometerAltIcon } from '@patternfly/react-icons';
import * as React from 'react';
import { Trans } from 'react-i18next';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';
import { interval } from 'rxjs';
import { DashboardCard } from '../../DashboardCard';
import { ChartContext } from '../context';
Expand Down
2 changes: 1 addition & 1 deletion src/app/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { useCryostatTranslation } from '@i18n/i18nextUtil';
import { Grid, GridItem } from '@patternfly/react-core';
import * as React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';
import { AddCard } from './AddCard';
import { ChartContext } from './Charts/context';
import { JFRMetricsChartController } from './Charts/jfr/JFRMetricsChartController';
Expand Down
2 changes: 1 addition & 1 deletion src/app/Dashboard/DashboardSolo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
import { MonitoringIcon } from '@patternfly/react-icons';
import * as React from 'react';
import { useSelector } from 'react-redux';
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
import { useLocation, useNavigate } from 'react-router-dom';
import { CardConfig } from './types';
import { getCardDescriptorByName } from './utils';

Expand Down
2 changes: 1 addition & 1 deletion src/app/Events/EventTemplates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import {
} from '@patternfly/react-table';
import _ from 'lodash';
import * as React from 'react';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';
import { forkJoin, Observable, of } from 'rxjs';
import { catchError, concatMap, defaultIfEmpty, first, tap } from 'rxjs/operators';

Expand Down
2 changes: 1 addition & 1 deletion src/app/Events/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { useSubscriptions } from '@app/utils/hooks/useSubscriptions';
import { getActiveTab, switchTab } from '@app/utils/utils';
import { Card, CardBody, Tab, Tabs } from '@patternfly/react-core';
import * as React from 'react';
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
import { useLocation, useNavigate } from 'react-router-dom';
import { EventTemplates } from './EventTemplates';
import { EventTypes } from './EventTypes';

Expand Down
2 changes: 1 addition & 1 deletion src/app/JMCAgent/JMCAgent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { useSubscriptions } from '@app/utils/hooks/useSubscriptions';
import { getActiveTab, switchTab } from '@app/utils/utils';
import { Card, CardBody, Tab, Tabs, Tooltip } from '@patternfly/react-core';
import * as React from 'react';
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
import { useLocation, useNavigate } from 'react-router-dom';
import { concatMap, filter } from 'rxjs';
import { AgentLiveProbes } from './AgentLiveProbes';
import { AgentProbeTemplates } from './AgentProbeTemplates';
Expand Down
2 changes: 1 addition & 1 deletion src/app/Recordings/ActiveRecordingsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import { EllipsisVIcon, ProcessAutomationIcon } from '@patternfly/react-icons';
import { SortByDirection, Tbody, Td, Tr } from '@patternfly/react-table';
import * as React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
import { useLocation, useNavigate } from 'react-router-dom';
import { combineLatest, forkJoin, Observable, Subject } from 'rxjs';
import { concatMap, filter, first } from 'rxjs/operators';
import { DeleteWarningModal } from '../Modal/DeleteWarningModal';
Expand Down
2 changes: 1 addition & 1 deletion src/app/Reports/Reports.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import {
import { ProcessAutomationIcon, SearchIcon } from '@patternfly/react-icons';
import * as React from 'react';
import { Trans } from 'react-i18next';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';
import { concatMap, filter, first, map, tap } from 'rxjs';

type ReportEntry = { loading: boolean; target: Target; hasSources: boolean; report: AggregateReport };
Expand Down
2 changes: 1 addition & 1 deletion src/app/Rules/CreateRule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import { HelpIcon } from '@patternfly/react-icons';
import _ from 'lodash';
import * as React from 'react';
import { Trans } from 'react-i18next';
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
import { useLocation, useNavigate } from 'react-router-dom';
import { combineLatest, forkJoin, iif, of, Subject } from 'rxjs';
import { catchError, debounceTime, map, switchMap, tap } from 'rxjs/operators';
import { RuleFormData } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/app/Rules/Rules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import {
import _ from 'lodash';
import * as React from 'react';
import { Trans } from 'react-i18next';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';
import { first } from 'rxjs/operators';
import { AUTOANALYZE_KEY } from './CreateRule';
import { RuleDeleteWarningModal } from './RuleDeleteWarningModal';
Expand Down
2 changes: 1 addition & 1 deletion src/app/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
} from '@patternfly/react-core';
import * as React from 'react';
import { Trans } from 'react-i18next';
import { useLocation, useNavigate } from 'react-router-dom-v5-compat';
import { useLocation, useNavigate } from 'react-router-dom';
import { AutoRefresh } from './Config/AutoRefresh';
import { ChartCards } from './Config/ChartCards';
import { DatetimeControl } from './Config/DatetimeControl';
Expand Down
2 changes: 1 addition & 1 deletion src/app/Shared/Components/CryostatLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { BASEPATH, toPath } from '@app/utils/utils';
import React from 'react';
import { Link, LinkProps, Path, To } from 'react-router-dom-v5-compat';
import { Link, LinkProps, Path, To } from 'react-router-dom';

export interface CryostatLinkProps extends LinkProps {}

Expand Down
2 changes: 1 addition & 1 deletion src/app/Topology/Actions/CreateTarget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import {
import { CheckCircleIcon, ExclamationCircleIcon, PendingIcon, SyncAltIcon } from '@patternfly/react-icons';
import { css } from '@patternfly/react-styles';
import * as React from 'react';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';

export const isValidTargetConnectURL = (connectUrl?: string) => connectUrl && !connectUrl.match(/\s+/);

Expand Down
2 changes: 1 addition & 1 deletion src/app/Topology/Actions/NodeActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
import { css } from '@patternfly/react-styles';
import { ContextMenuItem as PFContextMenuItem } from '@patternfly/react-topology';
import * as React from 'react';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';
import { Observable, Subject, switchMap } from 'rxjs';
import { GraphElement, ListElement } from '../Shared/types';
import { ActionUtils, MenuItemComponent, MenuItemVariant, NodeActionFunction } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/app/Topology/Actions/QuickSearchPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import { css } from '@patternfly/react-styles';
import { useHover } from '@patternfly/react-topology';
import _ from 'lodash';
import * as React from 'react';
import { useNavigate } from 'react-router-dom-v5-compat';
import { useNavigate } from 'react-router-dom';
import QuickSearchIcon from '../../Shared/Components/QuickSearchIcon';
import quickSearches, { QuickSearchId, quickSearchIds } from './quicksearches/all-quick-searches';
import { QuickSearchItem } from './types';
Expand Down
7 changes: 4 additions & 3 deletions src/app/Topology/Actions/WarningResolver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@
* limitations under the License.
*/
import { CreateCredentialModal } from '@app/SecurityPanel/Credentials/CreateCredentialModal';
import { CryostatLink } from '@app/Shared/Components/CryostatLink';
import { TargetNode } from '@app/Shared/Services/api.types';
import { NotificationsContext } from '@app/Shared/Services/Notifications.service';
import { ServiceContext } from '@app/Shared/Services/Services';
import { Button, ButtonProps } from '@patternfly/react-core';
import * as React from 'react';
import { Link, LinkProps, useNavigate } from 'react-router-dom-v5-compat';
import { LinkProps, useNavigate } from 'react-router-dom';
import { ActionUtils } from './types';

export interface WarningResolverAsLinkProps extends LinkProps {}

export const WarningResolverAsLink: React.FC<WarningResolverAsLinkProps> = ({ to, children, ...props }) => {
return (
<Link to={to} {...props}>
<CryostatLink to={to} {...props}>
{children}
</Link>
</CryostatLink>
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/app/Topology/Actions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Services } from '@app/Shared/Services/Services';
import { LabelProps, DropdownItemProps } from '@patternfly/react-core';
import { ContextMenuItem as PFContextMenuItem } from '@patternfly/react-topology';
import * as React from 'react';
import { NavigateFunction } from 'react-router-dom-v5-compat';
import { NavigateFunction } from 'react-router-dom';
import { Observable } from 'rxjs';
import type { GraphElement, ListElement } from '../Shared/types';

Expand Down
2 changes: 1 addition & 1 deletion src/app/Topology/Entity/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
Popover,
} from '@patternfly/react-core';
import * as React from 'react';
import { LinkProps } from 'react-router-dom-v5-compat';
import { LinkProps } from 'react-router-dom';
import {
catchError,
combineLatest,
Expand Down
2 changes: 1 addition & 1 deletion src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { NotificationsContext, NotificationsInstance } from '@app/Shared/Service
import { ServiceContext, defaultServices } from '@app/Shared/Services/Services';
import * as React from 'react';
import { Provider } from 'react-redux';
import { BrowserRouter as Router } from 'react-router-dom-v5-compat';
import { BrowserRouter as Router } from 'react-router-dom';
import { JoyrideProvider } from './Joyride/JoyrideProvider';
import { CapabilitiesContext, defaultCapabilities } from './Shared/Services/Capabilities';

Expand Down
2 changes: 1 addition & 1 deletion src/app/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import * as React from 'react';
import { useLocation, Route, Routes } from 'react-router-dom-v5-compat';
import { useLocation, Route, Routes } from 'react-router-dom';
import About from './About/About';
import Archives from './Archives/Archives';
import CreateRecording from './CreateRecording/CreateRecording';
Expand Down
2 changes: 1 addition & 1 deletion src/app/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ISortBy, SortByDirection, ThProps } from '@patternfly/react-table';
import humanizeDuration from 'humanize-duration';
import { TFunction } from 'i18next';
import _ from 'lodash';
import { NavigateFunction } from 'react-router-dom-v5-compat';
import { NavigateFunction } from 'react-router-dom';
import { BehaviorSubject, Observable } from 'rxjs';
import semverGt from 'semver/functions/gt';
import semverValid from 'semver/functions/valid';
Expand Down
4 changes: 2 additions & 2 deletions src/test/CreateRecording/CustomRecordingForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jest.mock('@patternfly/react-core', () => ({

const mockNavigate = jest.fn();

jest.mock('react-router-dom-v5-compat', () => ({
...jest.requireActual('react-router-dom-v5-compat'),
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useNavigate: () => mockNavigate,
}));

Expand Down
4 changes: 2 additions & 2 deletions src/test/CreateRecording/SnapshotRecordingForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jest.spyOn(defaultServices.target, 'authRetry').mockReturnValue(of());

const mockNavigate = jest.fn();

jest.mock('react-router-dom-v5-compat', () => ({
...jest.requireActual('react-router-dom-v5-compat'),
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useNavigate: () => mockNavigate,
}));

Expand Down
4 changes: 2 additions & 2 deletions src/test/Dashboard/Charts/jfr/JFRMetricsChartCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ const mockChartContext = {

const mockNavigate = jest.fn();

jest.mock('react-router-dom-v5-compat', () => ({
...jest.requireActual('react-router-dom-v5-compat'),
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useNavigate: () => mockNavigate,
}));

Expand Down
4 changes: 2 additions & 2 deletions src/test/Rules/CreateRule.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const mockRule: Rule = {

const mockNavigate = jest.fn();

jest.mock('react-router-dom-v5-compat', () => ({
...jest.requireActual('react-router-dom-v5-compat'),
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useNavigate: () => mockNavigate,
}));

Expand Down
4 changes: 2 additions & 2 deletions src/test/Settings/Settings.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ jest.mock('@app/Settings/Config/Theme', () => ({

const mockNavigate = jest.fn();

jest.mock('react-router-dom-v5-compat', () => ({
...jest.requireActual('react-router-dom-v5-compat'),
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useNavigate: () => mockNavigate,
}));

Expand Down
2 changes: 1 addition & 1 deletion src/test/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import userEvent from '@testing-library/user-event';
import { t, TOptions } from 'i18next';
import * as React from 'react';
import { Provider } from 'react-redux';
import { createMemoryRouter, RouterProvider } from 'react-router-dom-v5-compat';
import { createMemoryRouter, RouterProvider } from 'react-router-dom';
import renderer from 'react-test-renderer';

export interface ProviderInstance<T> {
Expand Down
Loading
Loading