ux(system): drop the disk gauge sublabel, keep just the %
The "LibrePortal X GB" sublabel under the disk percentage read as clutter; remove it. The % and the coloured LibrePortal portion of the ring stay. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
parent
3f5303a608
commit
533f1bb9e3
@ -225,12 +225,11 @@ class AdminSystem {
|
|||||||
+ ((this.d.storage && this.d.storage.total) || 0);
|
+ ((this.d.storage && this.d.storage.total) || 0);
|
||||||
const diskTotal = Number(rootDisk.total) || 0;
|
const diskTotal = Number(rootDisk.total) || 0;
|
||||||
const lpPct = diskTotal > 0 ? (lpBytes / diskTotal) * 100 : 0;
|
const lpPct = diskTotal > 0 ? (lpBytes / diskTotal) * 100 : 0;
|
||||||
const diskSub = lpBytes > 0 ? `LibrePortal ${this.bytes(lpBytes)}` : (rootDisk.mount || '/');
|
|
||||||
|
|
||||||
return `
|
return `
|
||||||
${wrap('cpu', C.gauge(cpu.percent || 0, { label: 'CPU', sublabel: `${cpu.cores || '?'} cores` }))}
|
${wrap('cpu', C.gauge(cpu.percent || 0, { label: 'CPU', sublabel: `${cpu.cores || '?'} cores` }))}
|
||||||
${wrap('mem', C.gauge(mem.percent || 0, { label: 'Memory', sublabel: `${this.bytes(mem.used)} / ${this.bytes(mem.total)}` }))}
|
${wrap('mem', C.gauge(mem.percent || 0, { label: 'Memory', sublabel: `${this.bytes(mem.used)} / ${this.bytes(mem.total)}` }))}
|
||||||
${wrap('disk', C.gauge(rootDisk.percent || 0, { label: 'Disk', sublabel: diskSub, segment: { value: lpPct, color: 'accent' } }))}
|
${wrap('disk', C.gauge(rootDisk.percent || 0, { label: 'Disk', segment: { value: lpPct, color: 'accent' } }))}
|
||||||
${wrap('load1', C.gauge(load1, { label: 'Load', display: load1.toFixed(2), suffix: '', max: cores * 2, color: loadColor, sublabel: `1m · ${cpu.load5 ?? '–'}/${cpu.load15 ?? '–'}` }))}`;
|
${wrap('load1', C.gauge(load1, { label: 'Load', display: load1.toFixed(2), suffix: '', max: cores * 2, color: loadColor, sublabel: `1m · ${cpu.load5 ?? '–'}/${cpu.load15 ?? '–'}` }))}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user