Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
40841a82a2 | |||
6f93d8d87c | |||
da7ca2029c | |||
1756478ef7 | |||
4d4c5b2f16 | |||
a57ce3dc94 | |||
bd9533182f | |||
9d8678e421 |
@ -7,7 +7,8 @@ window.onload = () ->
|
|||||||
document.getElementById('cpuInfo').innerText = data.brand
|
document.getElementById('cpuInfo').innerText = data.brand
|
||||||
document.getElementById('cpuCores').innerText = data.physicalCores
|
document.getElementById('cpuCores').innerText = data.physicalCores
|
||||||
document.getElementById('cpuThreads').innerText = data.cores
|
document.getElementById('cpuThreads').innerText = data.cores
|
||||||
document.getElementById('cpuClock').innerText = data.speed
|
document.getElementById('cpuClockBase').innerText = data.speed
|
||||||
|
document.getElementById('cpuClockBoost').innerText = data.speedMax
|
||||||
console.log(data)
|
console.log(data)
|
||||||
).catch((error) ->
|
).catch((error) ->
|
||||||
console.error(error)
|
console.error(error)
|
||||||
@ -20,7 +21,7 @@ setCpuTemp = () ->
|
|||||||
si.cpuTemperature()
|
si.cpuTemperature()
|
||||||
.then((data) ->
|
.then((data) ->
|
||||||
document.getElementById('cpuTemp').innerText = data.main
|
document.getElementById('cpuTemp').innerText = data.main
|
||||||
console.log(data)
|
document.getElementById('cpuTempDisplay').children.item(0).style.height = ((100 - parseFloat(data.main)) + '%')
|
||||||
).catch((error) ->
|
).catch((error) ->
|
||||||
console.error(error)
|
console.error(error)
|
||||||
)
|
)
|
||||||
|
@ -19,9 +19,10 @@ loadGpus = () ->
|
|||||||
while i < data.controllers.length
|
while i < data.controllers.length
|
||||||
optionElem = document.createElement('option')
|
optionElem = document.createElement('option')
|
||||||
optionElem.innerText = data.controllers[i].model
|
optionElem.innerText = data.controllers[i].model
|
||||||
optionElem.setAttribute 'value', i
|
optionElem.setAttribute('value', i)
|
||||||
document.getElementById('gpuSelector').appendChild optionElem
|
document.getElementById('gpuSelector').appendChild(optionElem)
|
||||||
i++
|
i++
|
||||||
|
console.log(data)
|
||||||
).catch((error) ->
|
).catch((error) ->
|
||||||
console.error(error)
|
console.error(error)
|
||||||
)
|
)
|
||||||
@ -31,10 +32,8 @@ updateGpuInfo = (gpuId = 0) ->
|
|||||||
.then((data) ->
|
.then((data) ->
|
||||||
document.getElementById('gpuInfo').innerText = data.controllers[gpuId].model
|
document.getElementById('gpuInfo').innerText = data.controllers[gpuId].model
|
||||||
document.getElementById('gpuVendor').innerText = data.controllers[gpuId].vendor
|
document.getElementById('gpuVendor').innerText = data.controllers[gpuId].vendor
|
||||||
document.getElementById('gpuVendorId').innerText = data.controllers[gpuId].vendorId
|
|
||||||
document.getElementById('gpuVram').innerText = data.controllers[gpuId].vram + 'MB'
|
document.getElementById('gpuVram').innerText = data.controllers[gpuId].vram + 'MB'
|
||||||
document.getElementById('gpuBus').innerText = data.controllers[gpuId].bus
|
document.getElementById('gpuBus').innerText = data.controllers[gpuId].bus
|
||||||
console.log(data)
|
|
||||||
).catch((error) ->
|
).catch((error) ->
|
||||||
console.error(error)
|
console.error(error)
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
body
|
body
|
||||||
background: white
|
background: white
|
||||||
|
font-size: 18px
|
||||||
|
|
||||||
a
|
a
|
||||||
color: cornflowerblue
|
color: cornflowerblue
|
||||||
@ -21,6 +22,9 @@ button
|
|||||||
background-color: darken(cornflowerblue, 10%)
|
background-color: darken(cornflowerblue, 10%)
|
||||||
color: white
|
color: white
|
||||||
|
|
||||||
|
.faded-text
|
||||||
|
color: #999
|
||||||
|
|
||||||
.u-text-center
|
.u-text-center
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
@ -40,6 +44,39 @@ button
|
|||||||
font-size: 2.5rem
|
font-size: 2.5rem
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
|
|
||||||
|
table.hardware-info
|
||||||
|
border-spacing: 0
|
||||||
|
padding: 8px
|
||||||
|
border: 1px solid #999
|
||||||
|
td
|
||||||
|
border: none
|
||||||
|
td:not(:nth-child(2))
|
||||||
|
border-right: 1px solid #bbb
|
||||||
|
tr:not(:last-child) td
|
||||||
|
border-bottom: 1px solid #bbb
|
||||||
|
|
||||||
|
.tempGauge
|
||||||
|
position: relative
|
||||||
|
box-sizing: border-box
|
||||||
|
width: 100%
|
||||||
|
max-width: 175px
|
||||||
|
height: 300px
|
||||||
|
margin-left: auto
|
||||||
|
margin-right: auto
|
||||||
|
border: 4px solid #212121
|
||||||
|
background: rgb(61,191,37)
|
||||||
|
background: linear-gradient(0deg, rgba(61,191,37,1) 45%, rgba(253,255,2,1) 65%, rgba(253,255,2,1) 75%, rgba(253,45,45,1) 100%)
|
||||||
|
|
||||||
|
.tempGaugeFill
|
||||||
|
display: block
|
||||||
|
position: absolute
|
||||||
|
left: 0
|
||||||
|
top: 0
|
||||||
|
box-sizing: border-box
|
||||||
|
width: 100%
|
||||||
|
height: 0
|
||||||
|
background: white
|
||||||
|
|
||||||
#header h1
|
#header h1
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
@ -51,6 +88,7 @@ button
|
|||||||
padding-top: 25px
|
padding-top: 25px
|
||||||
padding-bottom: 25px
|
padding-bottom: 25px
|
||||||
border-top: 1px solid #999
|
border-top: 1px solid #999
|
||||||
|
font-size: 16px
|
||||||
|
|
||||||
.row
|
.row
|
||||||
position: relative
|
position: relative
|
||||||
|
@ -8,14 +8,41 @@
|
|||||||
|
|
||||||
<header class="row">
|
<header class="row">
|
||||||
<div class="columns twelve u-text-center">
|
<div class="columns twelve u-text-center">
|
||||||
<h1>Sentry System Info</h1>
|
<h1>Sentry CPU Info</h1>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="row">
|
<section class="row">
|
||||||
<h5>CPU Model: <span id="cpuInfo">Random CPU</span></h5>
|
<article class="columns eight">
|
||||||
<p><span id="cpuCores">2</span>c/<span id="cpuThreads">4</span>t @ <span id="cpuClock">2.0</span>Ghz</p>
|
<h5>CPU Model: <span id="cpuInfo">Random CPU</span></h5>
|
||||||
<p>CPU temperature: <span id="cpuTemp">12</span>°C</p>
|
<table class="hardware-info">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Physical cores</td>
|
||||||
|
<td><span id="cpuCores">2</span> cores</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Logical threads</td>
|
||||||
|
<td><span id="cpuThreads">4</span> threads</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Base clock</td>
|
||||||
|
<td><span id="cpuClockBase">2.0</span>Ghz</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Boost clock</td>
|
||||||
|
<td><span id="cpuClockBoost">2.0</span>Ghz</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p>CPU temperature: <span id="cpuTemp">12</span>°C</p>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="columns four">
|
||||||
|
<div id="cpuTempDisplay" class="tempGauge">
|
||||||
|
<div class="tempGaugeFill"></div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="row">
|
<section class="row">
|
||||||
|
@ -15,9 +15,22 @@
|
|||||||
|
|
||||||
<section class="row">
|
<section class="row">
|
||||||
<h5>GPU Model: <span id="gpuInfo">Random GPU</span></h5>
|
<h5>GPU Model: <span id="gpuInfo">Random GPU</span></h5>
|
||||||
<p>Vendor: <span id="gpuVendor">N/a</span></p>
|
<table class="hardware-info">
|
||||||
<p>GPU Memory: <span id="gpuVram">N/a</span></p>
|
<tbody>
|
||||||
<p>Bus: <span id="gpuBus">N/a</span></p>
|
<tr>
|
||||||
|
<td>GPU vendor</td>
|
||||||
|
<td><span id="gpuVendor">N/a</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>GPU memory</td>
|
||||||
|
<td><span id="gpuVram">N/a</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Bus</td>
|
||||||
|
<td><span id="gpuBus">N/a</span></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="row">
|
<section class="row">
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
<footer id="footer">
|
<footer id="footer">
|
||||||
<div class="container fluid">
|
<div class="container fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="columns three"><p></p></div>
|
<div class="columns three">
|
||||||
|
<p class="faded-text no-margin u-text-center">Sentry v<span id="app-version"></span></p>
|
||||||
|
</div>
|
||||||
<div class="columns six">
|
<div class="columns six">
|
||||||
<p class="no-margin">This app was built using:</p>
|
<p class="no-margin u-text-center">Developed by Bit Goblin free of charge.</p>
|
||||||
<p class="no-margin">
|
</div>
|
||||||
Node.js <span id="node-version"></span>,
|
<div class="columns three">
|
||||||
Chromium <span id="chrome-version"></span>,
|
<p class="no-margin u-text-center"><a href="https://git.metaunix.net/BitGoblin/Sentry">Source code</a></p>
|
||||||
and Electron <span id="electron-version"></span>.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sentry",
|
"name": "sentry",
|
||||||
"version": "0.2.0",
|
"version": "0.2.2",
|
||||||
"description": "Desktop app to view system information and sensors",
|
"description": "Desktop app to view system information and sensors",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -9,15 +9,15 @@
|
|||||||
"build-windows": "electron-builder build --win",
|
"build-windows": "electron-builder build --win",
|
||||||
"grunt": "grunt"
|
"grunt": "grunt"
|
||||||
},
|
},
|
||||||
"repository": "https://git.metaunix.net/metaunix/sentry",
|
"repository": "https://git.metaunix.net/BitGoblin/sentry",
|
||||||
"homepage": "https://git.metaunix.net/metaunix/sentry#readme",
|
"homepage": "https://git.metaunix.net/BitGoblin/sentry#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"sensors",
|
"sensors",
|
||||||
"cpu",
|
"cpu",
|
||||||
"gpu",
|
"gpu",
|
||||||
"memory"
|
"memory"
|
||||||
],
|
],
|
||||||
"author": "Gregory Ballantine <gballantine@metaunix.net>",
|
"author": "Gregory Ballantine <gballantine@bitgoblin.tech>",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^18.2.4",
|
"electron": "^18.2.4",
|
||||||
@ -33,7 +33,7 @@
|
|||||||
"systeminformation": "^5.11.15"
|
"systeminformation": "^5.11.15"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId": "net.metaunix.sentry",
|
"appId": "net.bitgoblin.sentry",
|
||||||
"copyright": "Copyright © 2022 ${author}",
|
"copyright": "Copyright © 2022 ${author}",
|
||||||
"win": {
|
"win": {
|
||||||
"target": "nsis",
|
"target": "nsis",
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
const appInfo = require('./package.json');
|
||||||
|
|
||||||
// All of the Node.js APIs are available in the preload process.
|
// All of the Node.js APIs are available in the preload process.
|
||||||
// It has the same sandbox as a Chrome extension.
|
// It has the same sandbox as a Chrome extension.
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
@ -6,7 +8,5 @@ window.addEventListener('DOMContentLoaded', () => {
|
|||||||
if (element) element.innerText = text
|
if (element) element.innerText = text
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const type of ['chrome', 'node', 'electron']) {
|
replaceText('app-version', appInfo.version);
|
||||||
replaceText(`${type}-version`, process.versions[type])
|
});
|
||||||
}
|
|
||||||
})
|
|
||||||
|
Reference in New Issue
Block a user