mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-31 09:51:59 +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 history from 'lib/history';
|
||||
import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';
|
||||
import { defaultTo } from 'lodash-es';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
import { useQuery } from 'react-query';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
@ -107,7 +108,10 @@ function Application(): JSX.Element {
|
||||
);
|
||||
|
||||
const topLevelOperationsRoute = useMemo(
|
||||
() => (topLevelOperations ? topLevelOperations[servicename || ''] : []),
|
||||
() =>
|
||||
topLevelOperations
|
||||
? defaultTo(topLevelOperations[servicename || ''], [])
|
||||
: [],
|
||||
[servicename, topLevelOperations],
|
||||
);
|
||||
|
||||
|
@ -26,7 +26,11 @@ export const getColumnSearchProps = (
|
||||
const queryString = getQueryString(avialableParams, urlParams);
|
||||
|
||||
return (
|
||||
<Link to={`${ROUTES.APPLICATION}/${metrics}?${queryString.join('')}`}>
|
||||
<Link
|
||||
to={`${ROUTES.APPLICATION}/${encodeURIComponent(
|
||||
metrics,
|
||||
)}?${queryString.join('')}`}
|
||||
>
|
||||
<Name>{metrics}</Name>
|
||||
</Link>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user