Skip to content

Commit

Permalink
fix legacy route for traces (#374)
Browse files Browse the repository at this point in the history
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
  • Loading branch information
ps48 authored Apr 17, 2023
1 parent 2f78f54 commit 43f3ec4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 43f3ec4

Please sign in to comment.