From 43f3ec4ce67240c91476332fa1229cbd9f7cbe28 Mon Sep 17 00:00:00 2001 From: Shenoy Pratik Date: Mon, 17 Apr 2023 16:31:41 -0700 Subject: [PATCH] fix legacy route for traces (#374) Signed-off-by: Shenoy Pratik --- .../components/common/legacy_route_helpers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/components/trace_analytics/components/common/legacy_route_helpers.ts b/public/components/trace_analytics/components/common/legacy_route_helpers.ts index 139456bf5..3be7bfbf0 100644 --- a/public/components/trace_analytics/components/common/legacy_route_helpers.ts +++ b/public/components/trace_analytics/components/common/legacy_route_helpers.ts @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { observabilityID } from "../../../../../common/constants/shared"; +import { observabilityTracesID } from '../../../../../common/constants/shared'; -export const convertLegacyTraceAnalyticsUrl = (location: Location)=> { - const pathname = location.pathname.replace('trace-analytics-dashboards', observabilityID); - const hash = `#/trace_analytics${location.hash.replace(/^#/, '/home')}${ +export const convertLegacyTraceAnalyticsUrl = (location: Location) => { + const pathname = location.pathname.replace('trace-analytics-dashboards', observabilityTracesID); + const hash = `${location.hash}${ location.hash.includes('?') ? location.search.replace(/^\?/, '&') : location.search }`; return pathname + hash;