From 22d0861582fd62025ae6c0bdc221dbc6b2652e07 Mon Sep 17 00:00:00 2001 From: Thibault Le Ouay Date: Wed, 19 Jun 2024 23:19:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20public=20monitors=20(#883)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/docs/guides/introduction.mdx | 2 +- apps/web/src/app/play/checker/_components/checker-play.tsx | 2 +- apps/web/src/app/play/checker/page.tsx | 7 ++++++- apps/web/src/app/public/monitors/[id]/page.tsx | 4 ++-- .../src/app/status-page/[domain]/monitors/[id]/page.tsx | 5 +++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/docs/guides/introduction.mdx b/apps/docs/guides/introduction.mdx index c99b65da..b5ad6da0 100644 --- a/apps/docs/guides/introduction.mdx +++ b/apps/docs/guides/introduction.mdx @@ -4,5 +4,5 @@ title: Introduction Here's some content for the getting started with OpenStatus. -- How to use OpenStatus to test latency in GitHub Actions +- [How to use OpenStatus to test latency in GitHub Actions](/guides/test-latency-cf-workers-in-github-actions) diff --git a/apps/web/src/app/play/checker/_components/checker-play.tsx b/apps/web/src/app/play/checker/_components/checker-play.tsx index b65b19d9..a2d9b7e4 100644 --- a/apps/web/src/app/play/checker/_components/checker-play.tsx +++ b/apps/web/src/app/play/checker/_components/checker-play.tsx @@ -7,7 +7,7 @@ export default async function CheckerPlay() {
diff --git a/apps/web/src/app/play/checker/page.tsx b/apps/web/src/app/play/checker/page.tsx index 036ce90f..c7d89746 100644 --- a/apps/web/src/app/play/checker/page.tsx +++ b/apps/web/src/app/play/checker/page.tsx @@ -6,7 +6,12 @@ import CheckerPlay from "./_components/checker-play"; export const metadata: Metadata = { title: "Speed Checker", description: - "Get speed insights for your api, website from multiple regions.", + "Test the performance your api, website from multiple regions. Get speed insights for free.", + openGraph: { + title: "Speed Checker", + description: + "Test the performance your api, website from multiple regions. Get speed insights for free.", + }, }; export default async function PlayPage() { diff --git a/apps/web/src/app/public/monitors/[id]/page.tsx b/apps/web/src/app/public/monitors/[id]/page.tsx index 5f5b593a..f19560de 100644 --- a/apps/web/src/app/public/monitors/[id]/page.tsx +++ b/apps/web/src/app/public/monitors/[id]/page.tsx @@ -46,7 +46,7 @@ const searchParamsSchema = z.object({ value ?.trim() ?.split(",") - .filter((i) => flyRegions.includes(i as Region)) ?? flyRegions, + .filter((i) => flyRegions.includes(i as Region)) ?? [] ), }); @@ -119,7 +119,7 @@ export default async function Page({ period={period} quantile={quantile} interval={interval} - regions={regions as Region[]} // FIXME: not properly reseted after filtered + regions={regions.length ? (regions as Region[]) : monitor.regions} // FIXME: not properly reseted after filtered monitor={monitor} isQuantileDisabled={isQuantileDisabled} metricsByRegion={metricsByRegion} diff --git a/apps/web/src/app/status-page/[domain]/monitors/[id]/page.tsx b/apps/web/src/app/status-page/[domain]/monitors/[id]/page.tsx index 51efe289..8deaccae 100644 --- a/apps/web/src/app/status-page/[domain]/monitors/[id]/page.tsx +++ b/apps/web/src/app/status-page/[domain]/monitors/[id]/page.tsx @@ -46,7 +46,7 @@ const searchParamsSchema = z.object({ value ?.trim() ?.split(",") - .filter((i) => flyRegions.includes(i as Region)) ?? flyRegions, + .filter((i) => flyRegions.includes(i as Region)) ?? [] ), }); @@ -72,6 +72,7 @@ export default async function Page({ const { period, quantile, interval, regions } = search.data; + console.log(regions.length); // TODO: work it out easier const intervalMinutes = getMinutesByInterval(interval); const periodicityMinutes = getMinutesByInterval(monitor.periodicity); @@ -112,7 +113,7 @@ export default async function Page({ period={period} quantile={quantile} interval={interval} - regions={regions as Region[]} // FIXME: not properly reseted after filtered + regions={regions.length ? (regions as Region[]) : monitor.regions} // FIXME: not properly reseted after filtered monitor={monitor} isQuantileDisabled={isQuantileDisabled} metricsByRegion={metricsByRegion} -- 2.51.2