Display Windows fixed volumes individually in both fleet views

This commit is contained in:
2026-11-20 08:53:20 +01:00
parent 9c61f8f2eb
commit 04037c7acf
4 changed files with 55 additions and 4 deletions
+14 -1
View File
@@ -119,6 +119,19 @@ function Capacity({ free, total }: {
);
}
function DiskCapacity({ device }: { device: RecordValue }) {
// Only Windows fleet rows use drive letters. Linux mount inventories remain
// available in the detail view, without expanding every fleet row.
const drives = Array.isArray(device.volumes)
? device.volumes.map(v => record(v)).filter(v => typeof v.name === 'string' && /^[A-Z]:$/.test(v.name)) : [];
if (!drives.length) return <Capacity free={device.disk_free_bytes} total={device.disk_total_bytes} />;
return <>{drives.map(drive => (
<div className="drive-capacity" key={String(drive.name)}>
<strong>{String(drive.name)}</strong>{' '}<Capacity free={drive.free_bytes} total={drive.total_bytes} />
</div>
))}</>;
}
type Target = { customer: string; ids: string[] };
type Props = {
detailPath: string;
@@ -699,7 +712,7 @@ export function Devices({
)}
</td>
<td data-label="Speicher belegt / gesamt" className="capacity-cell">
<Capacity free={d.disk_free_bytes} total={d.disk_total_bytes} />
<DiskCapacity device={d} />
</td>
<td data-label="RAM belegt / gesamt" className="capacity-cell" title={measuredAt(d.ram_observed_at)}>
<Capacity free={d.ram_available_bytes} total={d.ram_total_bytes} />