mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-03 01:20:38 +08:00
fix: [GH-4383]: handle special characters in the services name (#4388)
* fix: [GH-4383]: handle special characters in the services name
This commit is contained in:
parent
4a1c48b72b
commit
f99da73098
@ -16,6 +16,7 @@ import {
|
|||||||
import useUrlQuery from 'hooks/useUrlQuery';
|
import useUrlQuery from 'hooks/useUrlQuery';
|
||||||
import history from 'lib/history';
|
import history from 'lib/history';
|
||||||
import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';
|
import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';
|
||||||
|
import { defaultTo } from 'lodash-es';
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
import { useQuery } from 'react-query';
|
import { useQuery } from 'react-query';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
@ -107,7 +108,10 @@ function Application(): JSX.Element {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const topLevelOperationsRoute = useMemo(
|
const topLevelOperationsRoute = useMemo(
|
||||||
() => (topLevelOperations ? topLevelOperations[servicename || ''] : []),
|
() =>
|
||||||
|
topLevelOperations
|
||||||
|
? defaultTo(topLevelOperations[servicename || ''], [])
|
||||||
|
: [],
|
||||||
[servicename, topLevelOperations],
|
[servicename, topLevelOperations],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -26,7 +26,11 @@ export const getColumnSearchProps = (
|
|||||||
const queryString = getQueryString(avialableParams, urlParams);
|
const queryString = getQueryString(avialableParams, urlParams);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link to={`${ROUTES.APPLICATION}/${metrics}?${queryString.join('')}`}>
|
<Link
|
||||||
|
to={`${ROUTES.APPLICATION}/${encodeURIComponent(
|
||||||
|
metrics,
|
||||||
|
)}?${queryString.join('')}`}
|
||||||
|
>
|
||||||
<Name>{metrics}</Name>
|
<Name>{metrics}</Name>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user