fix: checked_at field name in dashboard UI + landing copy

This commit is contained in:
M1
2026-03-16 14:37:44 +04:00
parent f4283a0915
commit 729529b7fa
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -182,7 +182,7 @@
: '<span class="text-gray-500">—</span>';
document.getElementById('stat-latency').textContent = avgLatency != null ? `${avgLatency}ms` : '—';
document.getElementById('stat-uptime').textContent = uptime != null ? `${uptime}%` : '—';
document.getElementById('stat-last').textContent = lastPing ? timeAgo(lastPing.pinged_at) : '—';
document.getElementById('stat-last').textContent = lastPing ? timeAgo(lastPing.checked_at) : '—';
// Latency chart
renderLatencyChart(results.slice().reverse());
@@ -191,7 +191,7 @@
const statusBar = document.getElementById('status-bar');
const barPings = results.slice(0, 60).reverse();
statusBar.innerHTML = barPings.map(c =>
`<div class="flex-1 ${c.up ? 'bg-green-500/70' : 'bg-red-500/70'}" title="${new Date(c.pinged_at).toLocaleString()}${c.up ? 'Up' : 'Down'} ${c.latency_ms ? c.latency_ms + 'ms' : ''}"></div>`
`<div class="flex-1 ${c.up ? 'bg-green-500/70' : 'bg-red-500/70'}" title="${new Date(c.checked_at).toLocaleString()}${c.up ? 'Up' : 'Down'} ${c.latency_ms ? c.latency_ms + 'ms' : ''}"></div>`
).join('') || '<div class="flex-1 bg-gray-800 text-center text-xs text-gray-600 leading-8">No data</div>';
// Pings table
@@ -200,7 +200,7 @@
<td class="px-4 py-2">${c.up ? '<span class="text-green-400">Up</span>' : '<span class="text-red-400">Down</span>'}</td>
<td class="px-4 py-2 text-gray-300">${c.status_code ?? '—'}</td>
<td class="px-4 py-2 text-gray-300">${c.latency_ms != null ? c.latency_ms + 'ms' : '—'}</td>
<td class="px-4 py-2 text-gray-500">${timeAgo(c.pinged_at)}</td>
<td class="px-4 py-2 text-gray-500">${timeAgo(c.checked_at)}</td>
<td class="px-4 py-2 text-red-400/70 text-xs truncate max-w-[200px]">${c.error ? escapeHtml(c.error) : ''}</td>
</tr>
`).join('');