Added a basic temperature display to the CPU page
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2022-06-08 00:46:56 -04:00
parent 5b42a1ef05
commit 9d8678e421
4 changed files with 35 additions and 9 deletions

View File

@ -8,7 +8,6 @@ window.onload = () ->
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)
)
@ -20,7 +19,7 @@ setCpuTemp = () ->
si.cpuTemperature()
.then((data) ->
document.getElementById('cpuTemp').innerText = data.main
console.log(data)
document.getElementById('cpuTempDisplay').children.item(0).style.height = (parseInt(data.main) + '%')
).catch((error) ->
console.error(error)
)

View File

@ -19,8 +19,8 @@ loadGpus = () ->
while i < data.controllers.length
optionElem = document.createElement('option')
optionElem.innerText = data.controllers[i].model
optionElem.setAttribute 'value', i
document.getElementById('gpuSelector').appendChild optionElem
optionElem.setAttribute('value', i)
document.getElementById('gpuSelector').appendChild(optionElem)
i++
).catch((error) ->
console.error(error)
@ -34,7 +34,6 @@ updateGpuInfo = (gpuId = 0) ->
document.getElementById('gpuVendorId').innerText = data.controllers[gpuId].vendorId
document.getElementById('gpuVram').innerText = data.controllers[gpuId].vram + 'MB'
document.getElementById('gpuBus').innerText = data.controllers[gpuId].bus
console.log(data)
).catch((error) ->
console.error(error)
)