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.

fix(ui): prevent text overflow in drawer cards

rcourtman4b0d6a05382d
diff --git a/frontend-modern/src/components/Dashboard/GuestDrawer.tsx b/frontend-modern/src/components/Dashboard/GuestDrawer.tsx
index 272c6de689..75983059b3 100644
--- a/frontend-modern/src/components/Dashboard/GuestDrawer.tsx
+++ b/frontend-modern/src/components/Dashboard/GuestDrawer.tsx
@@ -156,7 +156,7 @@ export const GuestDrawer: Component<GuestDrawerProps> = (props) => {
overflow-anchor: none prevents browser scroll anchoring from jumping when display toggles. */}
<div class={activeTab() === 'overview' ? '' : 'hidden'} style={{ "overflow-anchor": "none" }}>
{/* Flex layout - items grow to fill space, max ~4 per row */}
- <div class="flex flex-wrap gap-3 [&>*]:flex-1 [&>*]:basis-[calc(25%-0.75rem)] [&>*]:min-w-[200px] [&>*]:max-w-full">
+ <div class="flex flex-wrap gap-3 [&>*]:flex-1 [&>*]:basis-[calc(25%-0.75rem)] [&>*]:min-w-[200px] [&>*]:max-w-full [&>*]:overflow-hidden">
{/* System Info - always show */}
<div class="rounded border border-gray-200 bg-white/70 p-3 shadow-sm dark:border-gray-600/70 dark:bg-gray-900/30">
<div class="text-[11px] font-medium uppercase tracking-wide text-gray-700 dark:text-gray-200 mb-2">System</div>
@@ -196,7 +196,7 @@ export const GuestDrawer: Component<GuestDrawerProps> = (props) => {
<div class="text-[11px] font-medium uppercase tracking-wide text-gray-700 dark:text-gray-200 mb-2">Guest Info</div>
<div class="space-y-2">
<Show when={hasOsInfo()}>
- <div class="text-[11px] text-gray-600 dark:text-gray-300">
+ <div class="text-[11px] text-gray-600 dark:text-gray-300 truncate" title={`${osName()} ${osVersion()}`.trim()}>
<Show when={osName().length > 0}>
<span class="font-medium">{osName()}</span>
</Show>
@@ -212,7 +212,7 @@ export const GuestDrawer: Component<GuestDrawerProps> = (props) => {
<div class="flex flex-wrap gap-1">
<For each={ipAddresses()}>
{(ip) => (
- <span class="inline-block rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900/40 dark:text-blue-200" title={ip}>
+ <span class="inline-block rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900/40 dark:text-blue-200 max-w-full truncate" title={ip}>
{ip}
</span>
)}
@@ -301,18 +301,18 @@ export const GuestDrawer: Component<GuestDrawerProps> = (props) => {
const addresses = iface.addresses ?? [];
const hasTraffic = (iface.rxBytes ?? 0) > 0 || (iface.txBytes ?? 0) > 0;
return (
- <div class="rounded border border-dashed border-gray-200 p-2 dark:border-gray-700">
- <div class="flex items-center gap-2 text-[11px] font-medium text-gray-700 dark:text-gray-200">
- <span class="truncate">{iface.name || 'interface'}</span>
+ <div class="rounded border border-dashed border-gray-200 p-2 dark:border-gray-700 overflow-hidden">
+ <div class="flex items-center gap-2 text-[11px] font-medium text-gray-700 dark:text-gray-200 min-w-0">
+ <span class="truncate min-w-0">{iface.name || 'interface'}</span>
<Show when={iface.mac}>
- <span class="text-[9px] text-gray-400 dark:text-gray-500 font-normal">{iface.mac}</span>
+ <span class="text-[9px] text-gray-400 dark:text-gray-500 font-normal truncate shrink-0 max-w-[100px]" title={iface.mac}>{iface.mac}</span>
</Show>
</div>
<Show when={addresses.length > 0}>
<div class="flex flex-wrap gap-1 mt-1">
<For each={addresses}>
{(ip) => (
- <span class="inline-block rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900/40 dark:text-blue-200">
+ <span class="inline-block rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900/40 dark:text-blue-200 max-w-full truncate" title={ip}>
{ip}
</span>
)}
diff --git a/frontend-modern/src/components/Hosts/HostDrawer.tsx b/frontend-modern/src/components/Hosts/HostDrawer.tsx
index 1987a5c1a1..8c48278eeb 100644
--- a/frontend-modern/src/components/Hosts/HostDrawer.tsx
+++ b/frontend-modern/src/components/Hosts/HostDrawer.tsx
@@ -70,26 +70,26 @@ export const HostDrawer: Component<HostDrawerProps> = (props) => {
{/* Overview Tab */}
<div class={activeTab() === 'overview' ? '' : 'hidden'} style={{ "overflow-anchor": "none" }}>
- <div class="flex flex-wrap gap-3 [&>*]:flex-1 [&>*]:basis-[calc(25%-0.75rem)] [&>*]:min-w-[200px] [&>*]:max-w-full">
+ <div class="flex flex-wrap gap-3 [&>*]:flex-1 [&>*]:basis-[calc(25%-0.75rem)] [&>*]:min-w-[200px] [&>*]:max-w-full [&>*]:overflow-hidden">
{/* System Info */}
<div class="rounded border border-gray-200 bg-white/70 p-3 shadow-sm dark:border-gray-600/70 dark:bg-gray-900/30">
<div class="text-[11px] font-medium uppercase tracking-wide text-gray-700 dark:text-gray-200 mb-2">System</div>
<div class="space-y-1.5 text-[11px]">
- <div class="flex items-center justify-between">
- <span class="text-gray-500 dark:text-gray-400">Hostname</span>
- <span class="font-medium text-gray-700 dark:text-gray-200 select-all">{props.host.hostname}</span>
+ <div class="flex items-center justify-between gap-2 min-w-0">
+ <span class="text-gray-500 dark:text-gray-400 shrink-0">Hostname</span>
+ <span class="font-medium text-gray-700 dark:text-gray-200 select-all truncate" title={props.host.hostname}>{props.host.hostname}</span>
</div>
<div class="flex items-center justify-between">
<span class="text-gray-500 dark:text-gray-400">Platform</span>
<span class="font-medium text-gray-700 dark:text-gray-200 capitalize">{props.host.platform || 'Unknown'}</span>
</div>
- <div class="flex items-center justify-between">
- <span class="text-gray-500 dark:text-gray-400">OS</span>
- <span class="font-medium text-gray-700 dark:text-gray-200">{props.host.osName} {props.host.osVersion}</span>
+ <div class="flex items-center justify-between gap-2 min-w-0">
+ <span class="text-gray-500 dark:text-gray-400 shrink-0">OS</span>
+ <span class="font-medium text-gray-700 dark:text-gray-200 truncate" title={`${props.host.osName} ${props.host.osVersion}`}>{props.host.osName} {props.host.osVersion}</span>
</div>
- <div class="flex items-center justify-between">
- <span class="text-gray-500 dark:text-gray-400">Kernel</span>
- <span class="font-medium text-gray-700 dark:text-gray-200">{props.host.kernelVersion}</span>
+ <div class="flex items-center justify-between gap-2 min-w-0">
+ <span class="text-gray-500 dark:text-gray-400 shrink-0">Kernel</span>
+ <span class="font-medium text-gray-700 dark:text-gray-200 truncate" title={props.host.kernelVersion}>{props.host.kernelVersion}</span>
</div>
<div class="flex items-center justify-between">
<span class="text-gray-500 dark:text-gray-400">Architecture</span>
@@ -132,18 +132,18 @@ export const HostDrawer: Component<HostDrawerProps> = (props) => {
<div class="max-h-[140px] overflow-y-auto custom-scrollbar space-y-2">
<For each={props.host.networkInterfaces}>
{(iface) => (
- <div class="rounded border border-dashed border-gray-200 p-2 dark:border-gray-700">
- <div class="flex items-center gap-2 text-[11px] font-medium text-gray-700 dark:text-gray-200">
- <span class="truncate">{iface.name}</span>
+ <div class="rounded border border-dashed border-gray-200 p-2 dark:border-gray-700 overflow-hidden">
+ <div class="flex items-center gap-2 text-[11px] font-medium text-gray-700 dark:text-gray-200 min-w-0">
+ <span class="truncate min-w-0">{iface.name}</span>
<Show when={iface.mac}>
- <span class="text-[9px] text-gray-400 dark:text-gray-500 font-normal">{iface.mac}</span>
+ <span class="text-[9px] text-gray-400 dark:text-gray-500 font-normal truncate shrink-0 max-w-[100px]" title={iface.mac}>{iface.mac}</span>
</Show>
</div>
<Show when={iface.addresses && iface.addresses.length > 0}>
<div class="flex flex-wrap gap-1 mt-1">
<For each={iface.addresses}>
{(ip) => (
- <span class="inline-block rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900/40 dark:text-blue-200">
+ <span class="inline-block rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900/40 dark:text-blue-200 max-w-full truncate" title={ip}>
{ip}
</span>
)}
diff --git a/frontend-modern/src/components/shared/NodeDrawer.tsx b/frontend-modern/src/components/shared/NodeDrawer.tsx
index 10b5e6856b..afcbbfe3eb 100644
--- a/frontend-modern/src/components/shared/NodeDrawer.tsx
+++ b/frontend-modern/src/components/shared/NodeDrawer.tsx
@@ -92,22 +92,22 @@ export const NodeDrawer: Component<NodeDrawerProps> = (props) => {
{/* Overview Tab */}
<div class={activeTab() === 'overview' ? '' : 'hidden'} style={{ "overflow-anchor": "none" }}>
- <div class="flex flex-wrap gap-3 [&>*]:flex-1 [&>*]:basis-[calc(25%-0.75rem)] [&>*]:min-w-[200px] [&>*]:max-w-full">
+ <div class="flex flex-wrap gap-3 [&>*]:flex-1 [&>*]:basis-[calc(25%-0.75rem)] [&>*]:min-w-[200px] [&>*]:max-w-full [&>*]:overflow-hidden">
{/* System Info */}
<div class="rounded border border-gray-200 bg-white/70 p-3 shadow-sm dark:border-gray-600/70 dark:bg-gray-900/30">
<div class="text-[11px] font-medium uppercase tracking-wide text-gray-700 dark:text-gray-200 mb-2">System</div>
<div class="space-y-1.5 text-[11px]">
- <div class="flex items-center justify-between">
- <span class="text-gray-500 dark:text-gray-400">Node</span>
- <span class="font-medium text-gray-700 dark:text-gray-200 select-all">{props.node.name}</span>
+ <div class="flex items-center justify-between gap-2 min-w-0">
+ <span class="text-gray-500 dark:text-gray-400 shrink-0">Node</span>
+ <span class="font-medium text-gray-700 dark:text-gray-200 select-all truncate" title={props.node.name}>{props.node.name}</span>
</div>
- <div class="flex items-center justify-between">
- <span class="text-gray-500 dark:text-gray-400">Version</span>
- <span class="font-medium text-gray-700 dark:text-gray-200">{props.node.pveVersion}</span>
+ <div class="flex items-center justify-between gap-2 min-w-0">
+ <span class="text-gray-500 dark:text-gray-400 shrink-0">Version</span>
+ <span class="font-medium text-gray-700 dark:text-gray-200 truncate" title={props.node.pveVersion}>{props.node.pveVersion}</span>
</div>
- <div class="flex items-center justify-between">
- <span class="text-gray-500 dark:text-gray-400">Kernel</span>
- <span class="font-medium text-gray-700 dark:text-gray-200">{props.node.kernelVersion}</span>
+ <div class="flex items-center justify-between gap-2 min-w-0">
+ <span class="text-gray-500 dark:text-gray-400 shrink-0">Kernel</span>
+ <span class="font-medium text-gray-700 dark:text-gray-200 truncate" title={props.node.kernelVersion}>{props.node.kernelVersion}</span>
</div>
<Show when={props.node.uptime}>
<div class="flex items-center justify-between">