Refactor project structure: enhance tests, improve server shutdown, expand CI checks, and update UI for better event presentation.
This commit is contained in:
@@ -15,9 +15,11 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Image</th>
|
||||
<th>Tag</th>
|
||||
<th>Status</th>
|
||||
<th>Last Seen</th>
|
||||
<th>Hostname</th>
|
||||
<th>Provider</th>
|
||||
<th>Digest</th>
|
||||
<th>Created</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
@@ -28,16 +30,24 @@
|
||||
const res = await fetch('/api/updates');
|
||||
const data = await res.json();
|
||||
const tbody = document.querySelector('tbody');
|
||||
tbody.innerHTML = '';
|
||||
tbody.textContent = '';
|
||||
|
||||
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;
|
||||
const row = document.createElement('tr');
|
||||
const fields = [
|
||||
update.image,
|
||||
update.status,
|
||||
update.hostname,
|
||||
update.provider,
|
||||
update.digest,
|
||||
update.created ? new Date(update.created).toLocaleString() : '',
|
||||
];
|
||||
fields.forEach(value => {
|
||||
const td = document.createElement('td');
|
||||
td.textContent = value || '';
|
||||
row.appendChild(td);
|
||||
});
|
||||
tbody.appendChild(row);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -45,4 +55,4 @@
|
||||
load();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user