mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 12:49:06 +08:00
fix: fixed last seen sorting in endpoint table
This commit is contained in:
parent
6b418a125b
commit
6504f2565b
@ -586,7 +586,7 @@ export interface EndPointsTableRowData {
|
|||||||
callCount: number | string;
|
callCount: number | string;
|
||||||
latency: number | string;
|
latency: number | string;
|
||||||
errorRate: number | string;
|
errorRate: number | string;
|
||||||
lastUsed: string;
|
lastUsed: string | number;
|
||||||
groupedByMeta?: Record<string, string | number>;
|
groupedByMeta?: Record<string, string | number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -783,6 +783,11 @@ export const getEndPointsColumnsConfig = (
|
|||||||
},
|
},
|
||||||
align: 'right',
|
align: 'right',
|
||||||
className: `column`,
|
className: `column`,
|
||||||
|
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||||
|
render: (lastUsed: string): string =>
|
||||||
|
lastUsed === 'n/a' || lastUsed === '-'
|
||||||
|
? '-'
|
||||||
|
: getLastUsedRelativeTime(new Date(lastUsed).getTime()),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -813,7 +818,8 @@ export const formatEndPointsDataForTable = (
|
|||||||
lastUsed:
|
lastUsed:
|
||||||
endpoint.data.C === 'n/a' || endpoint.data.C === undefined
|
endpoint.data.C === 'n/a' || endpoint.data.C === undefined
|
||||||
? '-'
|
? '-'
|
||||||
: getLastUsedRelativeTime(Math.floor(Number(endpoint.data.C) / 1000000)), // Convert from nanoseconds to milliseconds
|
: new Date(Math.floor(Number(endpoint.data.C) / 1000000)).toISOString(), // Convert from nanoseconds to milliseconds
|
||||||
|
|
||||||
errorRate:
|
errorRate:
|
||||||
endpoint.data.F1 === undefined || endpoint.data.F1 === 'n/a'
|
endpoint.data.F1 === undefined || endpoint.data.F1 === 'n/a'
|
||||||
? 0
|
? 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user