Fix conversion

This commit is contained in:
ernstmul
2024-09-24 15:27:24 +02:00
parent 8c76d2f555
commit b24eea7777
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ export function bytesToSize(value: number, unit: Size, base = 1000) {
}
export function mbSecondsToGBHours(value: number, base: 1000 | 1024 = 1000) {
return (value / base) * (60 * 60);
return (value / base) / (60 * 60);
}
export function humanFileSize(
@@ -364,7 +364,7 @@
color: '#85DBD8',
tooltip: {
title: 'Executions',
label: `${Math.round(mbSecondsToGBHours(data.organizationUsage.executionsMBSecondsTotal)).toLocaleString('en-US')} GB hours`
label: `${(Math.round(mbSecondsToGBHours(data.organizationUsage.executionsMBSecondsTotal) * 100) / 100).toLocaleString('en-US')} GB hours`
}
},
{
@@ -372,7 +372,7 @@
color: '#FE9567',
tooltip: {
title: 'Deployments',
label: `${Math.round(mbSecondsToGBHours(data.organizationUsage.buildsMBSecondsTotal)).toLocaleString('en-US')} GB hours`
label: `${(Math.round(mbSecondsToGBHours(data.organizationUsage.buildsMBSecondsTotal) * 100) / 100).toLocaleString('en-US')} GB hours`
}
}
]}
@@ -380,7 +380,7 @@
<div class="u-flex u-main-space-between">
<p>
<span class="heading-level-4"
>{Math.round(totalGbHours).toLocaleString('en-US')}</span>
>{(Math.ceil(totalGbHours * 100) / 100).toLocaleString('en-US')}</span>
<span class="body-text-1 u-bold">{`GB hours`}</span>
</p>
</div>