Added a GPU info page
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
e797b8a040
commit
a7b1d6ab84
@ -4,6 +4,10 @@ window.onload = () ->
|
|||||||
si.graphics()
|
si.graphics()
|
||||||
.then((data) ->
|
.then((data) ->
|
||||||
document.getElementById('gpuInfo').innerText = data.controllers[0].model
|
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)
|
console.log(data)
|
||||||
).catch((error) ->
|
).catch((error) ->
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
28
assets/twig/gpu.twig
Normal file
28
assets/twig/gpu.twig
Normal 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
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "sentry",
|
"name": "sentry",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sentry",
|
"name": "sentry",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"systeminformation": "^5.11.15"
|
"systeminformation": "^5.11.15"
|
||||||
|
Loading…
Reference in New Issue
Block a user