Added a GPU info page
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2022-05-26 21:12:59 -04:00
parent e797b8a040
commit a7b1d6ab84
3 changed files with 34 additions and 2 deletions

View File

@ -4,6 +4,10 @@ window.onload = () ->
si.graphics()
.then((data) ->
document.getElementById('gpuInfo').innerText = data.controllers[0].model
document.getElementById('gpuVendor').innerText = data.controllers[0].vendor
document.getElementById('gpuVendorId').innerText = data.controllers[0].vendorId
document.getElementById('gpuVram').innerText = data.controllers[0].vram + 'MB'
document.getElementById('gpuBus').innerText = data.controllers[0].bus
console.log(data)
).catch((error) ->
console.error(error)

28
assets/twig/gpu.twig Normal file
View File

@ -0,0 +1,28 @@
{% extends 'layout.twig' %}
{% block scripts %}
<script src="./js/gpu.js" charset="utf-8"></script>
{% endblock %}
{% block content %}
<header class="row">
<div class="columns twelve u-text-center">
<h1>GPU Info</h1>
</div>
</header>
<section class="row">
<h5>GPU Model: <span id="gpuInfo">Random GPU</span></h5>
<p>Vendor: <span id="gpuVendor">N/a</span> | Vendor ID: <span id="gpuVendorId">N/a</span></p>
<p>GPU Memory: <span id="gpuVram">N/a</span></p>
<p>Bus: <span id="gpuBus">N/a</span></p>
</section>
<section class="row">
<div class="columns twelve">
<a href="index.html">Back</a>
</div>
</section>
{% endblock %}

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "sentry",
"version": "0.1.0",
"version": "0.1.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "sentry",
"version": "0.1.0",
"version": "0.1.1",
"license": "BSD-2-Clause",
"dependencies": {
"systeminformation": "^5.11.15"