mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 12:09:01 +08:00
fix: remove requirement of exceptionType and serviceName from errorDetail page URL (#1400)
* fix: remove requirement of exceptionType and serviceName from errorDetail page URL * chore: id is updated * chore: commented code is removed * chore: eslint error is fixed Co-authored-by: Palash <palashgdev@gmail.com>
This commit is contained in:
parent
c5c7fb238f
commit
c90e9ffa34
@ -101,9 +101,7 @@ function AllErrors(): JSX.Element {
|
||||
render: (value, record): JSX.Element => (
|
||||
<Tooltip overlay={(): JSX.Element => value}>
|
||||
<Link
|
||||
to={`${ROUTES.ERROR_DETAIL}?serviceName=${
|
||||
record.serviceName
|
||||
}&exceptionType=${record.exceptionType}&groupId=${
|
||||
to={`${ROUTES.ERROR_DETAIL}?groupId=${
|
||||
record.groupID
|
||||
}×tamp=${getNanoSeconds(record.lastSeen)}`}
|
||||
>
|
||||
|
@ -90,11 +90,9 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element {
|
||||
}
|
||||
|
||||
history.replace(
|
||||
`${history.location.pathname}?${urlKey.serviceName}=${serviceName}&${
|
||||
urlKey.exceptionType
|
||||
}=${errorType}&groupId=${idPayload.groupID}×tamp=${getNanoSeconds(
|
||||
timespamp,
|
||||
)}&errorId=${id}`,
|
||||
`${history.location.pathname}?&groupId=${
|
||||
idPayload.groupID
|
||||
}×tamp=${getNanoSeconds(timespamp)}&errorId=${id}`,
|
||||
);
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
|
@ -23,8 +23,6 @@ function ErrorDetails(): JSX.Element {
|
||||
const { search } = useLocation();
|
||||
const params = useMemo(() => new URLSearchParams(search), [search]);
|
||||
|
||||
const serviceName = params.get(urlKey.serviceName);
|
||||
const expectionType = params.get(urlKey.exceptionType);
|
||||
const groupId = params.get(urlKey.groupId);
|
||||
const errorId = params.get(urlKey.errorId);
|
||||
const timestamp = params.get(urlKey.timestamp);
|
||||
@ -50,34 +48,17 @@ function ErrorDetails(): JSX.Element {
|
||||
},
|
||||
);
|
||||
|
||||
const { data, status } = useQuery(
|
||||
[
|
||||
'expectionType',
|
||||
expectionType,
|
||||
'serviceName',
|
||||
serviceName,
|
||||
maxTime,
|
||||
minTime,
|
||||
groupId,
|
||||
],
|
||||
{
|
||||
queryFn: () =>
|
||||
getByErrorType({
|
||||
groupID: groupId || '',
|
||||
timestamp: timestamp || '',
|
||||
}),
|
||||
enabled:
|
||||
!!expectionType && !!serviceName && !!groupId && IdStatus !== 'success',
|
||||
},
|
||||
);
|
||||
const { data, status } = useQuery([maxTime, minTime, groupId], {
|
||||
queryFn: () =>
|
||||
getByErrorType({
|
||||
groupID: groupId || '',
|
||||
timestamp: timestamp || '',
|
||||
}),
|
||||
enabled: !!groupId && IdStatus !== 'success',
|
||||
});
|
||||
|
||||
// if errorType and serviceName is null redirecting to the ALL_ERROR page not now
|
||||
if (
|
||||
serviceName === null ||
|
||||
expectionType === null ||
|
||||
groupId === null ||
|
||||
timestamp === null
|
||||
) {
|
||||
if (groupId === null || timestamp === null) {
|
||||
return <Redirect to={ROUTES.ALL_ERROR} />;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user