Single sysfs sample loop drives three jobs off one daemon (modeled on van-failover): - live state at /run/van-thermal/state.json; new Cockpit "Temperatures" card reads it in the existing 5s loop (no per-refresh `sensors` shell-out) - journal alerts on ok<->warn<->crit crossings, with clear_margin hysteresis - throttled, self-rotating CSV history at /var/log/van-thermal.csv Sensors resolved by hwmon name+label (coretemp/Package id 0, nvme/Composite), never by hwmonN index (not stable across boots). Defaults: CPU warn 80 / crit 95, NVMe warn 65 / crit 70. deploy.sh installs + enables the service. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
51 lines
1.5 KiB
HTML
51 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Van Router</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link href="../base1/cockpit.css" type="text/css" rel="stylesheet">
|
|
<link href="vanrouter.css" type="text/css" rel="stylesheet">
|
|
<script src="../base1/cockpit.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="vr-wrap">
|
|
<div class="vr-head">
|
|
<h2>Van Router</h2>
|
|
<span id="updated" class="muted">loading…</span>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-head">
|
|
<h3>Access Point</h3>
|
|
<button id="ap-restart" class="btn">Restart AP</button>
|
|
</div>
|
|
<div id="ap"></div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>Temperatures</h3>
|
|
<div id="thermal"></div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>WAN Failover</h3>
|
|
<div id="failover"></div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>WAN / Uplinks</h3>
|
|
<table>
|
|
<thead>
|
|
<tr><th>Device</th><th>Type</th><th>State</th><th>IPv4</th><th>Metric</th><th>Actions</th></tr>
|
|
</thead>
|
|
<tbody id="wan"></tbody>
|
|
</table>
|
|
<p class="muted">Lower metric = preferred default route. <span class="active-wan">★ blue</span> = current internet egress.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="vanrouter.js"></script>
|
|
</body>
|
|
</html>
|