diff --git a/apps/web/.env.example b/apps/web/.env.example index 3215d81e..83313be5 100644 --- a/apps/web/.env.example +++ b/apps/web/.env.example @@ -65,3 +65,8 @@ CRON_SECRET= EXTERNAL_API_URL= PLAYGROUND_UNKEY_API_KEY= + +# RUM server with separate clickhouse for self-host +CLICKHOUSE_URL= +CLICKHOUSE_USERNAME= +CLICKHOUSE_PASSWORD= \ No newline at end of file diff --git a/apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/(overview)/_components/MetricCard.tsx b/apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/_components/rum-metric-card.tsx similarity index 61% rename from apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/(overview)/_components/MetricCard.tsx rename to apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/_components/rum-metric-card.tsx index d7a6a67f..f05afec6 100644 --- a/apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/(overview)/_components/MetricCard.tsx +++ b/apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/_components/rum-metric-card.tsx @@ -12,10 +12,8 @@ export const RUMMetricCard = async ({ }); return ( -

- {event} -

-

+

{event}

+

{data?.median || 0}

diff --git a/apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/page.tsx b/apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/page.tsx index 57707d32..83e56058 100644 --- a/apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/page.tsx +++ b/apps/web/src/app/app/[workspaceSlug]/(dashboard)/rum/page.tsx @@ -1,8 +1,12 @@ import * as React from "react"; +import Link from "next/link"; import { notFound } from "next/navigation"; +import { Button } from "@openstatus/ui"; + +import { EmptyState } from "@/components/dashboard/empty-state"; import { api } from "@/trpc/server"; -import { RUMMetricCard } from "./(overview)/_components/MetricCard"; +import { RUMMetricCard } from "./_components/rum-metric-card"; export const dynamic = "force-dynamic"; @@ -12,9 +16,27 @@ export default async function RUMPage() { if (!workspace) { return notFound(); } + if (workspace.dsn === null) { - return <>The feature is currently in beta and will be released soon.; + return ( + + + Contact Us + + + } + /> + ); } + return (
diff --git a/apps/web/src/components/icons.tsx b/apps/web/src/components/icons.tsx index a58de3c0..9f25b1a2 100644 --- a/apps/web/src/components/icons.tsx +++ b/apps/web/src/components/icons.tsx @@ -33,6 +33,7 @@ import { Play, Plug, Puzzle, + Ratio, Search, SearchCheck, Siren, @@ -104,6 +105,7 @@ export const Icons = { youtube: Youtube, "hour-glass": Hourglass, "candlestick-chart": CandlestickChart, + ratio: Ratio, discord: ({ ...props }: LucideProps) => (