chore: remove us-east region from UI, charts, and region selectors
This commit is contained in:
parent
cbb1a26582
commit
2d46491dee
|
|
@ -25,7 +25,6 @@ const sparklineSSR = sparklineFromPings;
|
||||||
|
|
||||||
const REGION_COLORS: Record<string, string> = {
|
const REGION_COLORS: Record<string, string> = {
|
||||||
'eu-central': '#3b82f6', // blue
|
'eu-central': '#3b82f6', // blue
|
||||||
'us-east': '#10b981', // green
|
|
||||||
'us-west': '#f59e0b', // amber
|
'us-west': '#f59e0b', // amber
|
||||||
'ap-southeast': '#a78bfa', // purple
|
'ap-southeast': '#a78bfa', // purple
|
||||||
'__none__': '#6b7280', // gray for null region
|
'__none__': '#6b7280', // gray for null region
|
||||||
|
|
@ -33,7 +32,6 @@ const REGION_COLORS: Record<string, string> = {
|
||||||
|
|
||||||
const REGION_LABELS: Record<string, string> = {
|
const REGION_LABELS: Record<string, string> = {
|
||||||
'eu-central': '🇩🇪 EU',
|
'eu-central': '🇩🇪 EU',
|
||||||
'us-east': '🇺🇸 US-E',
|
|
||||||
'us-west': '🇺🇸 US-W',
|
'us-west': '🇺🇸 US-W',
|
||||||
'ap-southeast': '🇸🇬 AP',
|
'ap-southeast': '🇸🇬 AP',
|
||||||
'__none__': '?',
|
'__none__': '?',
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ export function sparkline(values: number[], width = 120, height = 32, color = '#
|
||||||
export function sparklineFromPings(pings: Array<{latency_ms?: number|null, region?: string|null}>, width = 120, height = 32): string {
|
export function sparklineFromPings(pings: Array<{latency_ms?: number|null, region?: string|null}>, width = 120, height = 32): string {
|
||||||
const COLORS: Record<string, string> = {
|
const COLORS: Record<string, string> = {
|
||||||
'eu-central': '#3b82f6',
|
'eu-central': '#3b82f6',
|
||||||
'us-east': '#10b981',
|
|
||||||
'us-west': '#f59e0b',
|
'us-west': '#f59e0b',
|
||||||
'ap-southeast': '#a78bfa',
|
'ap-southeast': '#a78bfa',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,6 @@
|
||||||
<%
|
<%
|
||||||
const regionFlag = {
|
const regionFlag = {
|
||||||
'eu-central': '🇩🇪',
|
'eu-central': '🇩🇪',
|
||||||
'us-east': '🇺🇸',
|
|
||||||
'us-west': '🇺🇸',
|
'us-west': '🇺🇸',
|
||||||
'ap-southeast': '🇸🇬',
|
'ap-southeast': '🇸🇬',
|
||||||
};
|
};
|
||||||
|
|
@ -171,11 +170,11 @@
|
||||||
|
|
||||||
// ── Interactive latency chart ──────────────────────────────────────
|
// ── Interactive latency chart ──────────────────────────────────────
|
||||||
const REGION_COLORS = {
|
const REGION_COLORS = {
|
||||||
'eu-central': '#3b82f6', 'us-east': '#10b981',
|
'eu-central': '#3b82f6',
|
||||||
'us-west': '#f59e0b', 'ap-southeast': '#a78bfa', '__none__': '#6b7280'
|
'us-west': '#f59e0b', 'ap-southeast': '#a78bfa', '__none__': '#6b7280'
|
||||||
};
|
};
|
||||||
const REGION_FLAGS = {
|
const REGION_FLAGS = {
|
||||||
'eu-central': '🇩🇪 EU Central', 'us-east': '🇺🇸 US East',
|
'eu-central': '🇩🇪 EU Central',
|
||||||
'us-west': '🇺🇸 US West', 'ap-southeast': '🇸🇬 AP Southeast'
|
'us-west': '🇺🇸 US West', 'ap-southeast': '🇸🇬 AP Southeast'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -476,7 +475,7 @@
|
||||||
if (tbody) {
|
if (tbody) {
|
||||||
const tr = document.createElement('tr');
|
const tr = document.createElement('tr');
|
||||||
tr.className = 'hover:bg-gray-800/50';
|
tr.className = 'hover:bg-gray-800/50';
|
||||||
const regionFlags = {'eu-central':'🇩🇪','us-east':'🇺🇸','us-west':'🇺🇸','ap-southeast':'🇸🇬'};
|
const regionFlags = {'eu-central':'🇩🇪','us-west':'🇺🇸','ap-southeast':'🇸🇬'};
|
||||||
const regionDisplay = ping.region ? `${regionFlags[ping.region] || '🌐'} ${ping.region}` : '—';
|
const regionDisplay = ping.region ? `${regionFlags[ping.region] || '🌐'} ${ping.region}` : '—';
|
||||||
tr.innerHTML = `
|
tr.innerHTML = `
|
||||||
<td class="px-4 py-2">${ping.up ? '<span class="text-green-400">Up</span>' : '<span class="text-red-400">Down</span>'}</td>
|
<td class="px-4 py-2">${ping.up ? '<span class="text-green-400">Up</span>' : '<span class="text-red-400">Down</span>'}</td>
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,6 @@
|
||||||
|
|
||||||
const REGION_COLORS = {
|
const REGION_COLORS = {
|
||||||
'eu-central': '#3b82f6',
|
'eu-central': '#3b82f6',
|
||||||
'us-east': '#10b981',
|
|
||||||
'us-west': '#f59e0b',
|
'us-west': '#f59e0b',
|
||||||
'ap-southeast': '#a78bfa',
|
'ap-southeast': '#a78bfa',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
const methods = ['GET','POST','PUT','PATCH','DELETE','HEAD','OPTIONS'];
|
const methods = ['GET','POST','PUT','PATCH','DELETE','HEAD','OPTIONS'];
|
||||||
const intervals = [['1','1 second'],['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 = [['1','1 second'],['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 timeouts = [['5000','5 seconds'],['10000','10 seconds'],['30000','30 seconds'],['60000','60 seconds']];
|
const timeouts = [['5000','5 seconds'],['10000','10 seconds'],['30000','30 seconds'],['60000','60 seconds']];
|
||||||
const regions = [['eu-central','🇩🇪 EU Central'],['us-east','🇺🇸 US East'],['us-west','🇺🇸 US West'],['ap-southeast','🇸🇬 AP Southeast']];
|
const regions = [['eu-central','🇩🇪 EU Central'],['us-west','🇺🇸 US West'],['ap-southeast','🇸🇬 AP Southeast']];
|
||||||
const curMethod = monitor.method || 'GET';
|
const curMethod = monitor.method || 'GET';
|
||||||
const bodyHidden = ['GET','HEAD','OPTIONS'].includes(curMethod);
|
const bodyHidden = ['GET','HEAD','OPTIONS'].includes(curMethod);
|
||||||
%>
|
%>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue