From 274bb133c0e980205c3e7b896a399d7be8442bc6 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 20 May 2026 10:12:33 +0100 Subject: [PATCH] Clean up multi-mount disk cell labels --- .../src/components/Workloads/StackedDiskBar.tsx | 2 +- .../src/components/Workloads/stackedDiskBarModel.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend-modern/src/components/Workloads/StackedDiskBar.tsx b/frontend-modern/src/components/Workloads/StackedDiskBar.tsx index 6793e18121..b54597dc77 100644 --- a/frontend-modern/src/components/Workloads/StackedDiskBar.tsx +++ b/frontend-modern/src/components/Workloads/StackedDiskBar.tsx @@ -178,7 +178,7 @@ export function StackedDiskBar(props: StackedDiskBarProps) { fill={disk.color} /> - + {disk.inlineText} diff --git a/frontend-modern/src/components/Workloads/stackedDiskBarModel.ts b/frontend-modern/src/components/Workloads/stackedDiskBarModel.ts index fe225d32ac..fb79186391 100644 --- a/frontend-modern/src/components/Workloads/stackedDiskBarModel.ts +++ b/frontend-modern/src/components/Workloads/stackedDiskBarModel.ts @@ -128,7 +128,7 @@ function getShortDiskLabel(label: string): string { } function estimateInlineTextWidth(text: string): number { - return text.length * 4.6 + 4; + return text.length * 5.4 + 4; } function getInlineDiskText(shortLabel: string, percentLabel: string, slotWidth: number): string { @@ -136,12 +136,12 @@ function getInlineDiskText(shortLabel: string, percentLabel: string, slotWidth: if (slotWidth <= 0 || estimateInlineTextWidth(fullText) <= slotWidth) { return fullText; } - if (estimateInlineTextWidth(shortLabel) <= slotWidth) { - return shortLabel; - } if (estimateInlineTextWidth(percentLabel) <= slotWidth) { return percentLabel; } + if (estimateInlineTextWidth(shortLabel) <= slotWidth) { + return shortLabel; + } return ''; }