Added some basic system info gathering
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2022-05-25 14:43:54 -04:00
parent 6e6fa2b757
commit 056a5ad2a6
2 changed files with 40 additions and 0 deletions

View File

@ -3,6 +3,22 @@ si = require('systeminformation')
window.onload = () -> window.onload = () ->
si.cpu() si.cpu()
.then((data) -> .then((data) ->
document.getElementById('cpuInfo').innerText = data.brand
console.log(data)
).catch((error) ->
console.error(error)
)
si.cpuTemperature()
.then((data) ->
document.getElementById('cpuTemp').innerText = data.main
console.log(data)
).catch((error) ->
console.error(error)
)
si.graphics()
.then((data) ->
document.getElementById('gpuInfo').innerText = data.controllers[0].model
console.log(data) console.log(data)
).catch((error) -> ).catch((error) ->
console.error(error) console.error(error)

View File

@ -12,4 +12,28 @@
</div> </div>
</header> </header>
<section class="row">
<table class="columns twelve">
<thead>
<tr>
<th>HW Type</th>
<th>Hardware Model Info.</th>
<th>Current Temp.</th>
</tr>
</thead>
<tbody>
<tr>
<td>CPU</td>
<td id="cpuInfo"></td>
<td id="cpuTemp"></td>
</tr>
<tr>
<td>GPU</td>
<td id="gpuInfo"></td>
<td id="gpuTemp"></td>
</tr>
</tbody>
</table>
</section>
{% endblock %} {% endblock %}