mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 18:56:17 +01:00
fix display of values under 1 GB in disk usage chart (closes #261)
This commit is contained in:
@@ -272,7 +272,7 @@ export const getSizeAndUnit = (n: number, isGigabytes = true) => {
|
||||
} else if (sizeInGB >= 1) {
|
||||
return { v: sizeInGB, u: " GB" }
|
||||
}
|
||||
return { v: n, u: " MB" }
|
||||
return { v: isGigabytes ? sizeInGB * 1_000 : n, u: " MB" }
|
||||
}
|
||||
|
||||
export const chartMargin = { top: 12 }
|
||||
|
||||
Reference in New Issue
Block a user