Files
munin-bitcoin/web/index.html
T
Unheard0840 5c242a1e00 Update web/index.html
Connect web interface to status API
2026-08-06 18:49:45 +00:00

60 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Munin Bitcoin</title>
</head>
<body>
<h1>Munin Bitcoin</h1>
<h2>Service</h2>
<p id="service">Loading...</p>
<h2>Bitcoin Node</h2>
<p id="bitcoinNode">Loading...</p>
<h2>Wallet</h2>
<p id="wallet">Loading...</p>
<h2>Statistics</h2>
<p>Labels: <span id="labels">0</span></p>
<p>Transactions: <span id="transactions">0</span></p>
<h2>Last scan</h2>
<p id="lastScan">Loading...</p>
<script>
fetch('/api/status')
.then(response => response.json())
.then(status => {
document.getElementById('service').textContent =
'🟢 ' + status.service;
document.getElementById('bitcoinNode').textContent =
status.bitcoinNode;
document.getElementById('wallet').textContent =
status.wallet;
document.getElementById('labels').textContent =
status.labels;
document.getElementById('transactions').textContent =
status.transactions;
document.getElementById('lastScan').textContent =
status.lastScan;
})
.catch(error => {
document.getElementById('service').textContent =
'🔴 Error loading status';
console.error(error);
});
</script>
</body>
</html>