diff --git a/frontend/src/container/SideNav/SideNav.tsx b/frontend/src/container/SideNav/SideNav.tsx index 3b35a75a81..6cec0448b2 100644 --- a/frontend/src/container/SideNav/SideNav.tsx +++ b/frontend/src/container/SideNav/SideNav.tsx @@ -209,7 +209,9 @@ function SideNav({ if (event && isCtrlMetaKey(event)) { openInNewTab(`${key}?${queryString.join('&')}`); } else { - history.push(`${key}?${queryString.join('&')}`); + history.push(`${key}?${queryString.join('&')}`, { + from: pathname, + }); } } }, diff --git a/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts b/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts index 15bea36cba..cd39ba464c 100644 --- a/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts +++ b/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts @@ -75,7 +75,7 @@ const getHistogramSeries = ({ const legend = newLegend || lgd || ''; const label = isMergedSeries - ? 'merged_series' + ? '' : getLabelName(metric, queryName || '', legend); const color = generateColor(label, themeColors.chartcolors); diff --git a/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts b/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts index 2c1040daf4..7a5cd64f88 100644 --- a/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts +++ b/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts @@ -70,7 +70,7 @@ const generateTooltipContent = ( const value = data[index][idx]; const dataIngested = quantity[idx]; const label = isMergedSeries - ? 'merged_series' + ? '' : getLabelName(metric, queryName || '', legend || ''); let color = generateColor(label, themeColors.chartcolors); diff --git a/frontend/src/pages/Support/Support.tsx b/frontend/src/pages/Support/Support.tsx index 96276507f9..2d156a3816 100644 --- a/frontend/src/pages/Support/Support.tsx +++ b/frontend/src/pages/Support/Support.tsx @@ -10,6 +10,8 @@ import { MessageSquare, Slack, } from 'lucide-react'; +import { useEffect } from 'react'; +import { useHistory } from 'react-router-dom'; const { Title, Text } = Typography; @@ -84,11 +86,24 @@ const supportChannels = [ export default function Support(): JSX.Element { const { trackEvent } = useAnalytics(); + const history = useHistory(); const handleChannelWithRedirects = (url: string): void => { window.open(url, '_blank'); }; + useEffect(() => { + if (history?.location?.state) { + const histroyState = history?.location?.state as any; + + if (histroyState && histroyState?.from) { + trackEvent(`Support : From URL : ${histroyState.from}`); + } + } + + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const handleSlackConnectRequest = (): void => { const recipient = 'support@signoz.io'; const subject = 'Slack Connect Request';