Enhancement: better support for raw values in block highlighting (#6434)

This commit is contained in:
shamoon
2026-03-17 09:12:01 -07:00
committed by GitHub
parent 6bdea294c1
commit fadb03ad27
35 changed files with 300 additions and 78 deletions

View File

@@ -56,12 +56,23 @@ export default function Component({ service }) {
return (
<Container service={service}>
{showCpuLoad && (
<Block label="nextcloud.cpuload" value={t("common.percent", { value: nextcloudInfo.system.cpuload[0] })} />
<Block
label="nextcloud.cpuload"
value={t("common.percent", { value: nextcloudInfo.system.cpuload[0] })}
highlightValue={nextcloudInfo.system.cpuload[0]}
/>
)}
{showMemoryUsage && (
<Block
label="nextcloud.memoryusage"
value={t("common.percent", { value: memoryUsage })}
highlightValue={memoryUsage}
/>
)}
{showMemoryUsage && <Block label="nextcloud.memoryusage" value={t("common.percent", { value: memoryUsage })} />}
<Block
label="nextcloud.freespace"
value={t("common.bbytes", { value: nextcloudInfo.system.freespace, maximumFractionDigits: 1 })}
highlightValue={nextcloudInfo.system.freespace}
/>
<Block label="nextcloud.activeusers" value={t("common.number", { value: activeUsers.last24hours })} />
<Block label="nextcloud.numfiles" value={t("common.number", { value: nextcloudInfo.storage.num_files })} />