diff --git a/README.md b/README.md index 92ed8cc..996c358 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Another **serverless (and free!)** uptime monitoring & status page on Cloudflare #### Monitoring -- Up to 50 **2-minute** interval check on free plan (Up to unlimited 1-min check on paid Workers plan) +- Up to 50 **2-minute** interval check - **Geo-specific checks** from more than [310 cities](https://www.cloudflare.com/network/) around the world - Monitoring for **HTTP/HTTPS/TCP port** - Up to 90-day uptime history and uptime percentage @@ -37,7 +37,8 @@ Please refer to [Quickstart](https://github.com/lyc8503/UptimeFlare/wiki/Quickst ## TODOs -- [ ] SSL certificate checks +- [x] TCP `opened` promise +- [x] ~~SSL certificate checks~~ - [ ] Slack / Telegram webhook example - [ ] Incident timeline - [ ] Email notification via Cloudflare Email Workers diff --git a/docs/desktop.png b/docs/desktop.png index 260b00b..d90c359 100644 Binary files a/docs/desktop.png and b/docs/desktop.png differ diff --git a/pages/index.tsx b/pages/index.tsx index 587e290..b113259 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -13,12 +13,17 @@ export const runtime = 'experimental-edge' const inter = Inter({ subsets: ['latin'] }) export default function Home({ - state, + state: stateStr, monitors, }: { - state: MonitorState + state: string monitors: MonitorTarget[] }) { + let state; + if (stateStr !== undefined) { + state = JSON.parse(stateStr) as MonitorState + } + return ( <> @@ -70,7 +75,9 @@ export async function getServerSideProps() { const { UPTIMEFLARE_STATE } = process.env as unknown as { UPTIMEFLARE_STATE: KVNamespace } - const state = (await UPTIMEFLARE_STATE?.get('state', 'json')) as unknown as MonitorState + + // Read state as string from KV, to avoid hitting server-side cpu time limit + const state = (await UPTIMEFLARE_STATE?.get('state')) as unknown as MonitorState // Only present these values to client const monitors = workerConfig.monitors.map((monitor) => {