Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
chore: response logs cloud provider (#1423)
Maximilian Kaske1450882850cf
diff --git a/apps/dashboard/src/components/chart/chart-line-regions.tsx b/apps/dashboard/src/components/chart/chart-line-regions.tsxindex 3fafa43f6..2337ae679 100644--- a/apps/dashboard/src/components/chart/chart-line-regions.tsx+++ b/apps/dashboard/src/components/chart/chart-line-regions.tsx@@ -13,52 +13,23 @@ import {import { regionColors } from "@/data/regions";import { useIsMobile } from "@/hooks/use-mobile";import { cn } from "@/lib/utils";+import { monitorRegions } from "@openstatus/db/src/schema/constants";import { regionDict } from "@openstatus/utils";import { ChartTooltipNumber } from "./chart-tooltip-number";-const chartConfig = {- ams: { label: regionDict.ams.location, color: regionColors.ams },- arn: { label: regionDict.arn.location, color: regionColors.arn },- atl: { label: regionDict.atl.location, color: regionColors.atl },- bog: { label: regionDict.bog.location, color: regionColors.bog },- bom: { label: regionDict.bom.location, color: regionColors.bom },- bos: { label: regionDict.bos.location, color: regionColors.bos },- cdg: { label: regionDict.cdg.location, color: regionColors.cdg },- den: { label: regionDict.den.location, color: regionColors.den },- dfw: { label: regionDict.dfw.location, color: regionColors.dfw },- ewr: { label: regionDict.ewr.location, color: regionColors.ewr },- eze: { label: regionDict.eze.location, color: regionColors.eze },- fra: { label: regionDict.fra.location, color: regionColors.fra },- gdl: { label: regionDict.gdl.location, color: regionColors.gdl },- gig: { label: regionDict.gig.location, color: regionColors.gig },- gru: { label: regionDict.gru.location, color: regionColors.gru },- hkg: { label: regionDict.hkg.location, color: regionColors.hkg },- iad: { label: regionDict.iad.location, color: regionColors.iad },- jnb: { label: regionDict.jnb.location, color: regionColors.jnb },- lax: { label: regionDict.lax.location, color: regionColors.lax },- lhr: { label: regionDict.lhr.location, color: regionColors.lhr },- mad: { label: regionDict.mad.location, color: regionColors.mad },- mia: { label: regionDict.mia.location, color: regionColors.mia },- nrt: { label: regionDict.nrt.location, color: regionColors.nrt },- ord: { label: regionDict.ord.location, color: regionColors.ord },- otp: { label: regionDict.otp.location, color: regionColors.otp },- phx: { label: regionDict.phx.location, color: regionColors.phx },- qro: { label: regionDict.qro.location, color: regionColors.qro },- scl: { label: regionDict.scl.location, color: regionColors.scl },- sjc: { label: regionDict.sjc.location, color: regionColors.sjc },- sea: { label: regionDict.sea.location, color: regionColors.sea },- sin: { label: regionDict.sin.location, color: regionColors.sin },- syd: { label: regionDict.syd.location, color: regionColors.syd },- waw: { label: regionDict.waw.location, color: regionColors.waw },- yul: { label: regionDict.yul.location, color: regionColors.yul },- yyz: { label: regionDict.yyz.location, color: regionColors.yyz },- koyeb_fra: { label: regionDict.ams.location, color: regionColors.koyeb_fra },- koyeb_par: { label: regionDict.arn.location, color: regionColors.koyeb_par },- koyeb_sfo: { label: regionDict.atl.location, color: regionColors.koyeb_sfo },- koyeb_sin: { label: regionDict.bog.location, color: regionColors.koyeb_sin },- koyeb_tyo: { label: regionDict.bom.location, color: regionColors.koyeb_tyo },- koyeb_was: { label: regionDict.bos.location, color: regionColors.koyeb_was },-} satisfies ChartConfig;+const chartConfig = monitorRegions.reduce((config, region) => {+ const regionInfo = regionDict[region as keyof typeof regionDict];+ const color = regionColors[region as keyof typeof regionColors];++ if (regionInfo && color) {+ config[region] = {+ label: `${regionInfo.location} (${regionInfo.provider})`,+ color,+ };+ }++ return config;+}, {} as ChartConfig) satisfies ChartConfig;export type TrendPoint = {timestamp: number; // unix millisdiff --git a/apps/dashboard/src/components/common/icon-cloud-provider.tsx b/apps/dashboard/src/components/common/icon-cloud-provider.tsxindex eba01821b..4647a80d4 100644--- a/apps/dashboard/src/components/common/icon-cloud-provider.tsx+++ b/apps/dashboard/src/components/common/icon-cloud-provider.tsx@@ -32,7 +32,10 @@ export function IconCloudProviderTooltip(return (<TooltipProvider><Tooltip delayDuration={0}>- <TooltipTrigger type="button">+ <TooltipTrigger+ type="button"+ className="rounded-sm outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:ring-offset-2"+ ><IconCloudProvider {...props} /></TooltipTrigger><TooltipContent className="capitalize">{props.provider}</TooltipContent>diff --git a/apps/dashboard/src/components/data-table/response-logs/columns.tsx b/apps/dashboard/src/components/data-table/response-logs/columns.tsxindex 550c62508..ef5f397c3 100644--- a/apps/dashboard/src/components/data-table/response-logs/columns.tsx+++ b/apps/dashboard/src/components/data-table/response-logs/columns.tsx@@ -95,7 +95,14 @@ export const columns: ColumnDef<ResponseLog>[] = [}const regionConfig = regionDict[value as keyof typeof regionDict];- return regionConfig.location;+ return (+ <div>+ {regionConfig.location}{" "}+ <span className="text-muted-foreground/70 text-xs">+ ({regionConfig.provider})+ </span>+ </div>+ );},enableSorting: false,enableHiding: false,diff --git a/apps/dashboard/src/components/data-table/response-logs/data-table-basics.tsx b/apps/dashboard/src/components/data-table/response-logs/data-table-basics.tsxindex 33c87a0eb..16f792528 100644--- a/apps/dashboard/src/components/data-table/response-logs/data-table-basics.tsx+++ b/apps/dashboard/src/components/data-table/response-logs/data-table-basics.tsx@@ -1,5 +1,6 @@"use client";+import { IconCloudProvider } from "@/components/common/icon-cloud-provider";import { BlockWrapper } from "@/components/content/block-wrapper";import { TableCellDate } from "@/components/data-table/table-cell-date";import { TableCellNumber } from "@/components/data-table/table-cell-number";@@ -130,9 +131,23 @@ export function DataTableBasicsHTTP({Region</TableHead><TableCell className="max-w-full overflow-x-auto whitespace-normal font-mono">- {regionConfig?.flag} {regionConfig?.code}{" "}- <span className="text-muted-foreground">- {regionConfig?.location}+ {regionConfig?.code}{" "}+ <span className="text-muted-foreground text-xs">+ {regionConfig?.location} {regionConfig?.flag}+ </span>+ </TableCell>+ </TableRow>+ <TableRow className="[&>:not(:last-child)]:border-r">+ <TableHead className="bg-muted/50 font-normal text-muted-foreground">+ Cloud Provider+ </TableHead>+ <TableCell className="inline-flex max-w-full overflow-x-auto whitespace-normal font-mono">+ <IconCloudProvider+ provider={regionConfig?.provider}+ className="mt-0.5"+ />+ <span className="ml-1 text-muted-foreground">+ {regionConfig?.provider}</span></TableCell></TableRow>diff --git a/apps/dashboard/src/components/data-table/response-logs/regions/columns.tsx b/apps/dashboard/src/components/data-table/response-logs/regions/columns.tsxindex 418e91836..f0d1af9e7 100644--- a/apps/dashboard/src/components/data-table/response-logs/regions/columns.tsx+++ b/apps/dashboard/src/components/data-table/response-logs/regions/columns.tsx@@ -37,8 +37,7 @@ export const columns: ColumnDef<RegionMetric>[] = [{region.code.replace(/(koyeb_|railway_|fly_)/g, "")}</TooltipTrigger><TooltipContent side="left">- {region.location} -{" "}- <span className="capitalize">{region.provider}</span>+ {region.location} ({region.provider})</TooltipContent></Tooltip></TooltipProvider>