Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Clean up multi-mount disk cell labels

rcourtman274bb133c0e9
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}
/>
</svg>
- <span class="absolute inset-0 flex min-w-0 items-center justify-center overflow-hidden px-px text-center text-[8px] font-semibold leading-none text-base-content">
+ <span class="absolute inset-0 flex min-w-0 items-center justify-center overflow-hidden px-px text-center text-[9px] font-semibold leading-none text-base-content">
<span class="min-w-0 truncate">{disk.inlineText}</span>
</span>
</div>
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 '';
}