fix: checked_at field name in dashboard UI + landing copy
This commit is contained in:
parent
f4283a0915
commit
729529b7fa
|
|
@ -182,7 +182,7 @@
|
||||||
: '<span class="text-gray-500">—</span>';
|
: '<span class="text-gray-500">—</span>';
|
||||||
document.getElementById('stat-latency').textContent = avgLatency != null ? `${avgLatency}ms` : '—';
|
document.getElementById('stat-latency').textContent = avgLatency != null ? `${avgLatency}ms` : '—';
|
||||||
document.getElementById('stat-uptime').textContent = uptime != null ? `${uptime}%` : '—';
|
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
|
// Latency chart
|
||||||
renderLatencyChart(results.slice().reverse());
|
renderLatencyChart(results.slice().reverse());
|
||||||
|
|
@ -191,7 +191,7 @@
|
||||||
const statusBar = document.getElementById('status-bar');
|
const statusBar = document.getElementById('status-bar');
|
||||||
const barPings = results.slice(0, 60).reverse();
|
const barPings = results.slice(0, 60).reverse();
|
||||||
statusBar.innerHTML = barPings.map(c =>
|
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>';
|
).join('') || '<div class="flex-1 bg-gray-800 text-center text-xs text-gray-600 leading-8">No data</div>';
|
||||||
|
|
||||||
// Pings table
|
// 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">${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.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-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>
|
<td class="px-4 py-2 text-red-400/70 text-xs truncate max-w-[200px]">${c.error ? escapeHtml(c.error) : ''}</td>
|
||||||
</tr>
|
</tr>
|
||||||
`).join('');
|
`).join('');
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
<div class="hidden sm:block">${sparkline(latencies)}</div>
|
<div class="hidden sm:block">${sparkline(latencies)}</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<div class="text-sm text-gray-300">${avgLatency != null ? avgLatency + 'ms' : '—'}</div>
|
<div class="text-sm text-gray-300">${avgLatency != null ? avgLatency + 'ms' : '—'}</div>
|
||||||
<div class="text-xs text-gray-500">${lastPing ? timeAgo(lastPing.pinged_at) : 'no pings'}</div>
|
<div class="text-xs text-gray-500">${lastPing ? timeAgo(lastPing.checked_at) : 'no pings'}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-xs px-2 py-1 rounded ${m.enabled ? 'bg-gray-800 text-gray-400' : 'bg-yellow-900/30 text-yellow-500'}">${m.enabled ? m.interval_s + 's' : 'paused'}</div>
|
<div class="text-xs px-2 py-1 rounded ${m.enabled ? 'bg-gray-800 text-gray-400' : 'bg-yellow-900/30 text-yellow-500'}">${m.enabled ? m.interval_s + 's' : 'paused'}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -393,7 +393,7 @@
|
||||||
<div class="max-w-5xl mx-auto">
|
<div class="max-w-5xl mx-auto">
|
||||||
<div class="text-center mb-16">
|
<div class="text-center mb-16">
|
||||||
<h2 class="text-3xl sm:text-4xl font-bold tracking-tight mb-4">API-first, always</h2>
|
<h2 class="text-3xl sm:text-4xl font-bold tracking-tight mb-4">API-first, always</h2>
|
||||||
<p class="text-gray-400 text-lg max-w-2xl mx-auto">Create monitors, query results, and manage everything from your terminal.</p>
|
<p class="text-gray-400 text-lg max-w-2xl mx-auto">Create monitors, query results, and manage everything from your own app or terminal.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid lg:grid-cols-2 gap-6">
|
<div class="grid lg:grid-cols-2 gap-6">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue