Initialize project with DIUN Webhook Dashboard: core Go app, Docker setup, static assets, and documentation.
This commit is contained in:
48
static/index.html
Normal file
48
static/index.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user