Files
DiunDashboard/static/index.html

48 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>DIUN Updates</title>
<style>
body { font-family: sans-serif; background: #111; color: #eee; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px; border-bottom: 1px solid #333; }
th { text-align: left; }
</style>
</head>
<body>
<h2>Available Image Updates</h2>
<table id="updates">
<thead>
<tr>
<th>Image</th>
<th>Tag</th>
<th>Status</th>
<th>Last Seen</th>
</tr>
</thead>
<tbody></tbody>
</table>
<script>
async function load() {
const res = await fetch('/api/updates');
const data = await res.json();
const tbody = document.querySelector('tbody');
tbody.innerHTML = '';
Object.values(data).forEach(update => {
const row = `<tr>
<td>${update.image}</td>
<td>${update.tag}</td>
<td>${update.status}</td>
<td>${update.time}</td>
</tr>`;
tbody.innerHTML += row;
});
}
setInterval(load, 5000);
load();
</script>
</body>
</html>