Added some basic system info gathering
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
6e6fa2b757
commit
056a5ad2a6
@ -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)
|
||||||
|
@ -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 %}
|
||||||
|
Loading…
Reference in New Issue
Block a user