Added a CPU info page with some rudimentary CPU temperature polling
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:
27
assets/twig/cpu.twig
Normal file
27
assets/twig/cpu.twig
Normal file
@ -0,0 +1,27 @@
|
||||
{% extends 'layout.twig' %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="./js/cpu.js" charset="utf-8"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<header class="row">
|
||||
<div class="columns twelve u-text-center">
|
||||
<h1>Sentry System Info</h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="row">
|
||||
<h5>CPU Model: <span id="cpuInfo">Random CPU</span></h5>
|
||||
<p><span id="cpuCores">2</span>c/<span id="cpuThreads">4</span>t @ <span id="cpuClock">2.0</span>Ghz</p>
|
||||
<p>CPU temperature: <span id="cpuTemp">12</span>°C</p>
|
||||
</section>
|
||||
|
||||
<section class="row">
|
||||
<div class="columns twelve">
|
||||
<a href="index.html">Back</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
@ -1,39 +1,29 @@
|
||||
{% extends 'layout.twig' %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="./js/index.js" charset="utf-8"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<header class="row">
|
||||
<div class="columns twelve u-text-center">
|
||||
<h1>Sentry System Info</h1>
|
||||
<h1>Sentry System Monitor</h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="row">
|
||||
<table class="columns twelve">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>HW Type</th>
|
||||
<th>Hardware Model Info.</th>
|
||||
<th>Current Temp.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>CPU</td>
|
||||
<td id="cpuInfo"></td>
|
||||
<td id="cpuTemp"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPU</td>
|
||||
<td id="gpuInfo"></td>
|
||||
<td id="gpuTemp"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- CPU info page link -->
|
||||
<div class="columns six u-text-center">
|
||||
<a class="pageLink" href="cpu.html">
|
||||
<i class="fa-solid fa-microchip"></i>
|
||||
<p class="u-text-center">CPU</p>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- GPU info page link -->
|
||||
<div class="columns six u-text-center">
|
||||
<a class="pageLink" href="gpu.html">
|
||||
<i class="fa-solid fa-display"></i>
|
||||
<p class="u-text-center">Graphics Card</p>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -3,8 +3,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
|
||||
<link rel="stylesheet" href="{{ file_root }}/styles/skeleton-2.0.4.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
|
||||
<link rel="stylesheet" href="{{ file_root }}//styles/sentry.css">
|
||||
<title>Sentry System Monitor</title>
|
||||
<script src="{{ file_root }}/js/sentry.js" charset="utf-8"></script>
|
||||
|
Reference in New Issue
Block a user