mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 10:19:10 +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;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getNanoSeconds = (date: string): number => {
|
export const getNanoSeconds = (date: string): string => {
|
||||||
return (
|
return (
|
||||||
parseInt((new Date(date).getTime() / 1e3).toString(), 10) * 1e9 +
|
Math.floor(new Date(date).getTime() / 1e3).toString() +
|
||||||
Timestamp.fromString(date).getNano()
|
Timestamp.fromString(date).getNano().toString()
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element {
|
|||||||
getNextPrevId({
|
getNextPrevId({
|
||||||
errorID: errorId || idPayload.errorId,
|
errorID: errorId || idPayload.errorId,
|
||||||
groupID: idPayload.groupID,
|
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 (
|
const onClickErrorIdHandler = async (
|
||||||
id: string,
|
id: string,
|
||||||
timespamp: string,
|
timestamp: string,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
if (id.length === 0) {
|
if (id.length === 0) {
|
||||||
@ -92,7 +92,7 @@ function ErrorDetails(props: ErrorDetailsProps): JSX.Element {
|
|||||||
history.replace(
|
history.replace(
|
||||||
`${history.location.pathname}?&groupId=${
|
`${history.location.pathname}?&groupId=${
|
||||||
idPayload.groupID
|
idPayload.groupID
|
||||||
}×tamp=${getNanoSeconds(timespamp)}&errorId=${id}`,
|
}×tamp=${getNanoSeconds(timestamp)}&errorId=${id}`,
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notification.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"
|
resolved "https://registry.yarnpkg.com/chartjs-adapter-date-fns/-/chartjs-adapter-date-fns-2.0.0.tgz#5e53b2f660b993698f936f509c86dddf9ed44c6b"
|
||||||
integrity sha512-rmZINGLe+9IiiEB0kb57vH3UugAtYw33anRiw5kS2Tu87agpetDDoouquycWc9pRsKtQo5j+vLsYHyr8etAvFw==
|
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:
|
"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.3:
|
||||||
version "3.5.3"
|
version "3.5.3"
|
||||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
|
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user