From e28733d246272171bed25f080e51af36bae2e81d Mon Sep 17 00:00:00 2001 From: palash-signoz Date: Wed, 16 Mar 2022 23:26:45 +0530 Subject: [PATCH] feat: onClick in new tab is added (#842) --- frontend/src/container/MetricsTable/index.tsx | 3 +-- frontend/src/container/Trace/TraceTable/index.tsx | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/container/MetricsTable/index.tsx b/frontend/src/container/MetricsTable/index.tsx index 63a2d94439..48d1eb2d7b 100644 --- a/frontend/src/container/MetricsTable/index.tsx +++ b/frontend/src/container/MetricsTable/index.tsx @@ -3,7 +3,6 @@ import localStorageGet from 'api/browser/localstorage/get'; import localStorageSet from 'api/browser/localstorage/set'; import { SKIP_ONBOARDING } from 'constants/onboarding'; import ROUTES from 'constants/routes'; -import history from 'lib/history'; import React, { useState } from 'react'; import { useSelector } from 'react-redux'; import { servicesListItem } from 'store/actions/MetricsActions/metricsInterfaces'; @@ -28,7 +27,7 @@ const Metrics = (): JSX.Element => { }; const onClickHandler = (to: string): void => { - history.push(to); + window.open(to, '_blank'); }; if ( diff --git a/frontend/src/container/Trace/TraceTable/index.tsx b/frontend/src/container/Trace/TraceTable/index.tsx index 9a1155a5c7..1aae8018b7 100644 --- a/frontend/src/container/Trace/TraceTable/index.tsx +++ b/frontend/src/container/Trace/TraceTable/index.tsx @@ -119,10 +119,7 @@ const TraceTable = ({ getSpansAggregate }: TraceProps): JSX.Element => { columns={columns} onRow={(record) => ({ onClick: (): void => { - history.push({ - pathname: ROUTES.TRACE + '/' + record.traceID, - search: '?' + 'spanId=' + record.spanID, - }); + window.open(`${ROUTES.TRACE}/${record.traceID}?spanId=${record.spanID}`); }, })} size="middle"