mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 03:04:03 +00:00
Remove memory extras row per design
This commit is contained in:
@@ -77,24 +77,6 @@ export function GuestRow(props: GuestRowProps) {
|
||||
const total = props.guest.memory.total ?? 0;
|
||||
return `${formatBytes(used)}/${formatBytes(total)}`;
|
||||
});
|
||||
|
||||
const memoryExtraInfo = createMemo(() => {
|
||||
if (!props.guest.memory) return [] as string[];
|
||||
const extras: string[] = [];
|
||||
const total = props.guest.memory.total ?? 0;
|
||||
if (props.guest.memory.balloon && props.guest.memory.balloon > 0 && props.guest.memory.balloon !== total) {
|
||||
extras.push(`balloon ${formatBytes(props.guest.memory.balloon)}`);
|
||||
}
|
||||
if (
|
||||
props.guest.memory.swapUsed &&
|
||||
props.guest.memory.swapUsed > 0 &&
|
||||
props.guest.memory.swapTotal &&
|
||||
props.guest.memory.swapTotal > 0
|
||||
) {
|
||||
extras.push(`swap ${formatBytes(props.guest.memory.swapUsed)}/${formatBytes(props.guest.memory.swapTotal)}`);
|
||||
}
|
||||
return extras;
|
||||
});
|
||||
const diskPercent = createMemo(() => {
|
||||
if (!props.guest.disk || props.guest.disk.total === 0) return 0;
|
||||
// Check if usage is -1 (unknown/no guest agent)
|
||||
@@ -276,11 +258,6 @@ export function GuestRow(props: GuestRowProps) {
|
||||
sublabel={memoryUsageLabel()}
|
||||
type="memory"
|
||||
/>
|
||||
<Show when={memoryExtraInfo().length > 0}>
|
||||
<div class="mt-0.5 flex flex-wrap gap-1 text-[10px] text-gray-500 dark:text-gray-300">
|
||||
<For each={memoryExtraInfo()}>{(info) => <span>{info}</span>}</For>
|
||||
</div>
|
||||
</Show>
|
||||
</td>
|
||||
|
||||
{/* Disk */}
|
||||
|
||||
Reference in New Issue
Block a user