Skip to content

Commit c6a2195

Browse files
committed
fix CI/CD, better coloring
1 parent 150f911 commit c6a2195

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

cron-vercel/scripts/region-deploy.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,16 @@ async function main() {
106106

107107
// Run vercel deploy
108108
console.log('\nRunning vercel deploy...');
109-
await $`npx vercel deploy --prebuilt --prod`;
109+
if(process.env.VERCEL_TOKEN) {
110+
// CI/CD
111+
const token = process.env.VERCEL_TOKEN;
112+
const orgId = process.env.VERCEL_ORG_ID;
113+
const projectId = process.env.VERCEL_PROJECT_ID;
114+
await $`npx vercel deploy --prebuilt --prod --token=${token} --org-id=${orgId} --project-id=${projectId}`;
115+
} else {
116+
// Locally using vercel login
117+
await $`npx vercel deploy --prebuilt --prod`;
118+
}
110119

111120
console.log('Region configuration completed successfully!');
112121
}

dashboard/components/database-sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export function DatabaseSidebar({
286286
key={`${group.regionLabel}-${group.connectionMethod}`}
287287
className={cn(
288288
"flex items-center space-x-2 rounded-md px-2 py-2 hover:bg-accent",
289-
group.databases.some(db => selectedDatabases.includes(db.id)) && "bg-accent/50",
289+
group.databases.some(db => selectedDatabases.includes(db.id)) ? "bg-accent/50" : group.connectionMethod === "ws" && "bg-yellow-50"
290290
)}
291291
>
292292
<Checkbox

dashboard/components/latency-table.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ function LatencyTableClient({ databases, functions, latencyData, connectionFilte
355355
<div className="font-medium break-words text-sm">
356356
{group.regionLabel}
357357
<div className="font-normal text-xs text-muted-foreground mt-1 break-all">
358-
{group.regionCode} via<br />@neondatabase/serverless {group.connectionMethod === 'http' ? 'http' : 'websocket'}
358+
{group.regionCode} via<br />@neondatabase/serverless{" "}{group.connectionMethod === 'http' ? <strong>http</strong> : <strong>websocket</strong>}
359359
</div>
360360
</div>
361361
</TableHead>
@@ -422,7 +422,7 @@ function LatencyTableClient({ databases, functions, latencyData, connectionFilte
422422
key={`${fn.id}-${group.regionLabel}-${group.connectionMethod}-cold`}
423423
className={cn(
424424
"text-center w-full min-w-[200px]",
425-
isSameRegionMatch && "bg-green-50",
425+
isSameRegionMatch ? "bg-green-50" : group.connectionMethod === "ws" && "bg-yellow-50",
426426
groupIndex !== 0 && "border-l-2 border-l-muted"
427427
)}
428428
>
@@ -436,7 +436,7 @@ function LatencyTableClient({ databases, functions, latencyData, connectionFilte
436436
key={`${fn.id}-${group.regionLabel}-${group.connectionMethod}-hot`}
437437
className={cn(
438438
"text-center w-full min-w-[200px]",
439-
isSameRegionMatch && "bg-green-50",
439+
isSameRegionMatch ? "bg-green-50" : group.connectionMethod === "ws" && "bg-yellow-50",
440440
queryType === "both" && "border-l",
441441
groupIndex !== 0 && queryType !== "both" && "border-l-2 border-l-muted"
442442
)}

0 commit comments

Comments
 (0)