Enhancement: configurable CPU temp scale (#3332)

---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
David Hirsch 2024-04-20 01:32:14 +02:00 committed by GitHub
parent 068e664f16
commit c95837f54e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 5 deletions

View file

@ -8,7 +8,7 @@ import CpuTemp from "./cputemp";
import Uptime from "./uptime";
export default function Resources({ options }) {
const { expanded, units, diskUnits } = options;
const { expanded, units, diskUnits, tempmin, tempmax } = options;
let { refresh } = options;
if (!refresh) refresh = 1500;
refresh = Math.max(refresh, 1000);
@ -23,7 +23,9 @@ export default function Resources({ options }) {
<Disk key={disk} options={{ disk }} expanded={expanded} diskUnits={diskUnits} refresh={refresh} />
))
: options.disk && <Disk options={options} expanded={expanded} diskUnits={diskUnits} refresh={refresh} />}
{options.cputemp && <CpuTemp expanded={expanded} units={units} refresh={refresh} />}
{options.cputemp && (
<CpuTemp expanded={expanded} units={units} refresh={refresh} tempmin={tempmin} tempmax={tempmax} />
)}
{options.uptime && <Uptime refresh={refresh} />}
</div>
{options.label && (