diff --git a/apps/web/src/views/detail.ejs b/apps/web/src/views/detail.ejs index c9e2bb9..ced518b 100644 --- a/apps/web/src/views/detail.ejs +++ b/apps/web/src/views/detail.ejs @@ -117,10 +117,6 @@
<% - const regionFlag = { - 'eu-central': 'πŸ‡©πŸ‡ͺ', - 'us-west': 'πŸ‡ΊπŸ‡Έ', - }; %> @@ -139,7 +135,7 @@ - + @@ -200,9 +196,9 @@ 'eu-central': '#3b82f6', 'us-west': '#f59e0b', '__none__': '#6b7280' }; - const REGION_FLAGS = { - 'eu-central': 'πŸ‡©πŸ‡ͺ EU Central', - 'us-west': 'πŸ‡ΊπŸ‡Έ US West' + const REGION_LABELS = { + 'eu-central': 'EU Central', + 'us-west': 'US West' }; const MAX_RUNS = 100; @@ -360,7 +356,7 @@ if (regions.length > 1) { legendEl.innerHTML = regions.map(r => { const c = REGION_COLORS[r] || '#6b7280'; - const l = REGION_FLAGS[r] || r; + const l = REGION_LABELS[r] || r; return `${l}`; }).join(''); } else { @@ -433,7 +429,7 @@ result.group.sort((a, b) => (a.ping.latency_ms || 0) - (b.ping.latency_ms || 0)); for (const pt of result.group) { const c = REGION_COLORS[pt.region] || '#6b7280'; - const label = REGION_FLAGS[pt.region] || pt.region; + const label = REGION_LABELS[pt.region] || pt.region; const status = pt.ping.up ? '' : ' DOWN'; html += `
${label} @@ -510,11 +506,10 @@ if (regions.length > 0) { html += '
'; for (const r of regions) { - const flag = {'eu-central':'πŸ‡©πŸ‡ͺ','us-west':'πŸ‡ΊπŸ‡Έ'}[r.region] || '🌐'; - const rLabel = r.region || 'unknown'; + const rLabel = {'eu-central':'EU Central','us-west':'US West'}[r.region] || r.region || 'unknown'; const status = r.up ? 'Up' : 'Down'; const lat = r.latency_ms != null ? `${r.latency_ms}ms` : ''; - html += `
${flag} ${rLabel}${lat} ${status}
`; + html += `
${rLabel}${lat} ${status}
`; } html += '
'; } @@ -616,8 +611,7 @@ if (tbody) { const tr = document.createElement('tr'); tr.className = 'table-row-alt'; - const regionFlags = {'eu-central':'πŸ‡©πŸ‡ͺ','us-west':'πŸ‡ΊπŸ‡Έ'}; - const regionDisplay = ping.region ? `${regionFlags[ping.region] || '🌐'} ${ping.region}` : 'β€”'; + const regionDisplay = ping.region || 'β€”'; tr.innerHTML = `
diff --git a/apps/web/src/views/partials/monitor-form.ejs b/apps/web/src/views/partials/monitor-form.ejs index cf36f68..ae9b297 100644 --- a/apps/web/src/views/partials/monitor-form.ejs +++ b/apps/web/src/views/partials/monitor-form.ejs @@ -12,7 +12,7 @@ const allIntervals = [['2','2 seconds'],['5','5 seconds'],['10','10 seconds'],['20','20 seconds'],['30','30 seconds'],['60','1 minute'],['300','5 minutes'],['600','10 minutes'],['1800','30 minutes'],['3600','1 hour']]; const intervals = allIntervals.filter(([val]) => Number(val) >= minInterval); const timeouts = [['5000','5 seconds'],['10000','10 seconds'],['20000','20 seconds'],['30000','30 seconds'],['40000','40 seconds'],['50000','50 seconds'],['60000','60 seconds']]; - const regions = [['eu-central','πŸ‡©πŸ‡ͺ EU Central'],['us-west','πŸ‡ΊπŸ‡Έ US West']]; + const regions = [['eu-central','EU Central'],['us-west','US West']]; const curMethod = monitor.method || 'GET'; const bodyHidden = ['GET','HEAD','OPTIONS'].includes(curMethod); %>
<%~ c.up ? 'Up' : 'Down' %> <%= c.status_code != null ? c.status_code : 'β€”' %> <%= c.latency_ms != null ? c.latency_ms + 'ms' : 'β€”' %><%= c.region ? (regionFlag[c.region] || '🌐') + ' ' + c.region : 'β€”' %><%= c.region || 'β€”' %> <%= c.run_id || 'β€”' %> <%~ it.timeAgoSSR(c.checked_at) %><% if (c.jitter_ms != null) { %> (+<%= c.jitter_ms %>ms)<% } %> <%= c.error ? c.error : '' %>${ping.up ? 'Up' : 'Down'} ${ping.status_code ?? 'β€”'}