Gregory Ballantine
fb1d0fc664
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
28 lines
760 B
CoffeeScript
28 lines
760 B
CoffeeScript
si = require('systeminformation')
|
|
|
|
window.onload = () ->
|
|
# Grab the static CPU information
|
|
si.cpu()
|
|
.then((data) ->
|
|
document.getElementById('cpuInfo').innerText = data.brand
|
|
document.getElementById('cpuCores').innerText = data.physicalCores
|
|
document.getElementById('cpuThreads').innerText = data.cores
|
|
document.getElementById('cpuClock').innerText = data.speed
|
|
console.log(data)
|
|
).catch((error) ->
|
|
console.error(error)
|
|
)
|
|
|
|
# Start the CPU temperature loop
|
|
setCpuTemp()
|
|
|
|
setCpuTemp = () ->
|
|
si.cpuTemperature()
|
|
.then((data) ->
|
|
document.getElementById('cpuTemp').innerText = data.main
|
|
console.log(data)
|
|
).catch((error) ->
|
|
console.error(error)
|
|
)
|
|
setTimeout(setCpuTemp, 2000)
|