mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 04:39:01 +08:00
fix(exceptions-page): 🚑 unix nanoseconds operations (#1403)
Signed-off-by: Prashant Shahi <prashant@signoz.io>
This commit is contained in:
parent
b9d63d6b8f
commit
e4883495c3
@ -74,10 +74,10 @@ export const getDefaultOrder = (
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export const getNanoSeconds = (date: string): number => {
|
||||
export const getNanoSeconds = (date: string): string => {
|
||||
return (
|
||||
parseInt((new Date(date).getTime() / 1e3).toString(), 10) * 1e9 +
|
||||
Timestamp.fromString(date).getNano()
|
||||
Math.floor(new Date(date).getTime() / 1e3).toString() +
|
||||
Timestamp.fromString(date).getNano().toString()
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -40,7 +40,7 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element {
|
||||
getNextPrevId({
|
||||
errorID: errorId || idPayload.errorId,
|
||||
groupID: idPayload.groupID,
|
||||
timestamp: timestamp || getNanoSeconds(idPayload.timestamp).toString(),
|
||||
timestamp: timestamp || getNanoSeconds(idPayload.timestamp),
|
||||
}),
|
||||
},
|
||||
);
|
||||
@ -79,7 +79,7 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element {
|
||||
|
||||
const onClickErrorIdHandler = async (
|
||||
id: string,
|
||||
timespamp: string,
|
||||
timestamp: string,
|
||||
): Promise<void> => {
|
||||
try {
|
||||
if (id.length === 0) {
|
||||
@ -92,7 +92,7 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element {
|
||||
history.replace(
|
||||
`${history.location.pathname}?&groupId=${
|
||||
idPayload.groupID
|
||||
}×tamp=${getNanoSeconds(timespamp)}&errorId=${id}`,
|
||||
}×tamp=${getNanoSeconds(timestamp)}&errorId=${id}`,
|
||||
);
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
|
@ -4093,6 +4093,11 @@ chartjs-adapter-date-fns@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/chartjs-adapter-date-fns/-/chartjs-adapter-date-fns-2.0.0.tgz#5e53b2f660b993698f936f509c86dddf9ed44c6b"
|
||||
integrity sha512-rmZINGLe+9IiiEB0kb57vH3UugAtYw33anRiw5kS2Tu87agpetDDoouquycWc9pRsKtQo5j+vLsYHyr8etAvFw==
|
||||
|
||||
chartjs-plugin-annotation@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/chartjs-plugin-annotation/-/chartjs-plugin-annotation-1.4.0.tgz#4c84cec1ec838bc09712f3686237866e6c3f4798"
|
||||
integrity sha512-OC0eGoVvdxTtGGi8mV3Dr+G1YmMhtYYQWqGMb2uWcgcnyiBslaRKPofKwAYWPbh7ABnmQNsNDQLIKPH+XiaZLA==
|
||||
|
||||
"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.3:
|
||||
version "3.5.3"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
|
||||
|
Loading…
x
Reference in New Issue
Block a user