mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-29 03:53:14 +03:00
Fixes duration in stats
This commit is contained in:
parent
307a56637c
commit
dd9650c91b
@ -83,12 +83,18 @@ export function Stats() {
|
||||
}
|
||||
|
||||
function getDuration(stat) {
|
||||
if (stat.logs.length < 2) {
|
||||
return "-";
|
||||
}
|
||||
const start = stat.logs[stat.logs.length - 1].createdAt;
|
||||
const end = stat.logs[0].createdAt;
|
||||
return getFormattedDiff(start, end);
|
||||
}
|
||||
|
||||
function getWaitingInQueueDuration(stat) {
|
||||
if (stat.logs.length < 2) {
|
||||
return "-";
|
||||
}
|
||||
const start = stat.createdAt;
|
||||
const end = stat.logs[stat.logs.length - 1].createdAt;
|
||||
return getFormattedDiff(start, end);
|
||||
|
Loading…
Reference in New Issue
Block a user