Skip to content

Commit

Permalink
Add sysinfo to troubleshooting tab #377
Browse files Browse the repository at this point in the history
  • Loading branch information
petervanderwalt committed Dec 5, 2024
1 parent ba00fe3 commit 6ba47ff
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 13 deletions.
30 changes: 22 additions & 8 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@
<div class="card-header p-1 m-0">
<i class="fas fa-fw fa-tty"></i>&nbsp;Communications
</div>
<div class="card-content" style="height: calc(100vh - 630px); min-height: 90px; overflow-x: auto;">
<div class="card-content" style="height: calc(100vh - 530px); min-height: 90px; overflow-x: auto;">
<table class="table striped compact">
<thead>
<tr>
Expand All @@ -1400,32 +1400,46 @@
<tbody>
<tr>
<td class="pt-1 mt-0 pb-0 pt-0">Installed Version</td>
<td class="pt-1 mt-0 pb-0 pt-0"><span class="tally bg-openbuilds fg-white" id="driverver">NOCOMM</span></td>
<td class="pt-1 mt-0 pb-0 pt-0"><span id="driverver">NOCOMM</span></td>
</tr>
<tr>
<td class="pt-1 mt-0 pb-0 pt-0">Backend Queue Blocked</td>
<td class="pt-1 mt-0 pb-0 pt-0"><span class="tally bg-openbuilds fg-white" id="commblocked">NOCOMM</span></td>
<td class="pt-1 mt-0 pb-0 pt-0"><span id="commblocked">NOCOMM</span></td>
</tr>
<tr>
<td class="pt-1 mt-0 pb-0 pt-0">Connection Status</td>
<td class="pt-1 mt-0 pb-0 pt-0"><span class="tally bg-openbuilds fg-white" id="commstatus">NOCOMM</span></td>
<td class="pt-1 mt-0 pb-0 pt-0"><span id="commstatus">NOCOMM</span></td>
</tr>
<tr>
<td class="pt-1 mt-0 pb-0 pt-0">Connected To</td>
<td class="pt-1 mt-0 pb-0 pt-0"><span class="tally bg-openbuilds fg-white" id="activeportstatus">NOCOMM</span></td>
<td class="pt-1 mt-0 pb-0 pt-0"><span id="activeportstatus">NOCOMM</span></td>
</tr>
<tr>
<td class="pt-1 mt-0 pb-0 pt-0">Serial Queue</td>
<td class="pt-1 mt-0 pb-0 pt-0"><span class="tally bg-openbuilds fg-white" id="drvqueue">NOCOMM</span></td>
<td class="pt-1 mt-0 pb-0 pt-0"><span id="drvqueue">NOCOMM</span></td>
</tr>
<tr>
<td class="pt-1 mt-0 pb-0 pt-0">Websocket Status</td>
<td class="pt-1 mt-0 pb-0 pt-0"><span class="tally bg-openbuilds fg-white" id="websocketstatus">NOCOMM</span></td>
<td class="pt-1 mt-0 pb-0 pt-0"><span id="websocketstatus">NOCOMM</span></td>
</tr>
<tr>
<td class="pt-1 mt-0 pb-0 pt-0">Firmware</td>
<td class="pt-1 mt-0 pb-0 pt-0"><span class="tally bg-openbuilds fg-white" id="firmwareversionstatus">NOCOMM</span></td>
<td class="pt-1 mt-0 pb-0 pt-0"><span id="firmwareversionstatus">NOCOMM</span></td>
</tr>
<tr>
<td class="pt-1 mt-0 pb-0 pt-0">Computer</td>
<td class="pt-1 mt-0 pb-0 pt-0">
<b>Motherboard:</b> <span id="mobospecs">NOCOMM</span><br>
<b>CPU:</b> <span id="cpuspecs">NOCOMM</span><br>
<b>GPU:</b> <span id="gpuspecs">NOCOMM</span><br>
<b>Memory:</b> <span id="memoryspecs">NOCOMM</span><br>
<b>OS:</b> <span id="osspecs">NOCOMM</span><br>
<b>Network:</b> <span id="ipspecs">NOCOMM</span><br>
</td>
</tr>



</tbody>
</table>
</div>
Expand Down
29 changes: 24 additions & 5 deletions app/js/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,30 @@ function initSocket() {
socket.on('sysinfo', function(sysinfo) {
console.log(sysinfo)
lastsysinfo = sysinfo;

var mobo = sysinfo.hardware.motherboard.manufacturer + " " + sysinfo.hardware.motherboard.model
$("#mobospecs").html(mobo)


var cpu = sysinfo.hardware.cpu[0].model
$("#cpuspecs").html(cpu)

var gpu = sysinfo.hardware.gpu[0].model + " (" + sysinfo.hardware.gpu[0].vram + "mb)"
$("#gpuspecs").html(gpu)

var memory = "Free: " + sysinfo.hardware.memory.free + " / Total: " + sysinfo.hardware.memory.total;
$("#memoryspecs").html(memory)

var operatingsys = sysinfo.operatingSystem.distro + " / " + sysinfo.operatingSystem.arch + " (" + sysinfo.operatingSystem.version + ")";
$("#osspecs").html(operatingsys)



var ipaddresses = sysinfo.network.flatMap(iface => iface.addresses.map(addr => addr.address)).join(' / ');
$("#ipspecs").html(ipaddresses)



});

socket.on('status', function(status) {
Expand Down Expand Up @@ -743,11 +767,6 @@ function initSocket() {

$("#firmwareversionstatus").html(status.machine.firmware.platform + " " + status.machine.firmware.version + " (" + status.machine.firmware.date + ")");






// Grbl Pins Input Status
$('.pinstatus').removeClass('alert').addClass('success').html('OFF')
$('#holdpin').html('HOLD/DOOR:OFF')
Expand Down

0 comments on commit 6ba47ff

Please sign in to comment.