We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f37304 commit 5dd8183Copy full SHA for 5dd8183
src/utils/disks/prepareDisks.ts
@@ -153,6 +153,7 @@ export function prepareVDiskSizeFields({
153
SlotSize: string | number | undefined;
154
}) {
155
const available = Number(AvailableSize ?? 0);
156
+ // Unlike available, allocated is displayed in UI, it is incorrect to fallback it to 0
157
const allocated = Number(AllocatedSize);
158
const slotSize = Number(SlotSize);
159
@@ -163,7 +164,7 @@ export function prepareVDiskSizeFields({
163
164
sizeLimit = slotSize;
165
}
166
- const allocatedPercent = Math.floor((allocated * 100) / sizeLimit);
167
+ const allocatedPercent = sizeLimit > 0 ? Math.floor((allocated * 100) / sizeLimit) : NaN;
168
169
return {
170
AvailableSize: available,
0 commit comments