wavehunter: add QMDL storage

Instead of reading/writing to a single QMDL file, we now can manage
a directory of several files, and have the ability to start/stop writing
to them on the fly.

This commit also adds graceful exiting to the server, so we can perform
cleanup steps when the server's exiting.
This commit is contained in:
Will Greenberg
2024-01-10 15:47:52 -08:00
parent 3d869971d9
commit 7b972ef5e4
14 changed files with 742 additions and 126 deletions

View File

@@ -4,19 +4,35 @@
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/main.js"></script>
<script>
async function repeatedlyPopulate() {
await populateDivs();
setTimeout(repeatedlyPopulate, 1000);
}
window.onload = function() {
setInterval(function() {
populateDivs();
}, 1000);
repeatedlyPopulate();
}
</script>
</head>
<body>
<div id="downloads">
<span><a href="/api/pcap/latest.pcap">Latest PCAP</a></span>
<span><a href="/api/qmdl/latest.qmdl">Latest QMDL</a></span>
<div>
<button onclick="startRecording()">Start Recording</button>
<button onclick="stopRecording()">Stop Recording</button>
</div>
<table id="qmdl-manifest-table">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Date Started</th>
<th scope="col">Date Stopped</th>
<th scope="col">Size (bytes)</th>
<th scope="col">PCAP</th>
<th scope="col">QMDL</th>
</tr>
</thead>
</table>
<div>
<h3>System stats</h3>
<pre id="system-stats">Loading...</pre>
</div>
<pre id="system-stats">Loading...</pre>
<pre id="diag-stats">Loading...</pre>
</body>
</html>