From 056a5ad2a6938243ffd38662040e296ffb3e4554 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Wed, 25 May 2022 14:43:54 -0400 Subject: [PATCH] Added some basic system info gathering --- assets/coffee/index.coffee | 16 ++++++++++++++++ assets/twig/index.twig | 24 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/assets/coffee/index.coffee b/assets/coffee/index.coffee index 4a4a7cc..75f3463 100644 --- a/assets/coffee/index.coffee +++ b/assets/coffee/index.coffee @@ -3,6 +3,22 @@ si = require('systeminformation') window.onload = () -> si.cpu() .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) ).catch((error) -> console.error(error) diff --git a/assets/twig/index.twig b/assets/twig/index.twig index 77c872b..ac2f251 100644 --- a/assets/twig/index.twig +++ b/assets/twig/index.twig @@ -12,4 +12,28 @@ +
+ + + + + + + + + + + + + + + + + + + + +
HW TypeHardware Model Info.Current Temp.
CPU
GPU
+
+ {% endblock %}