Files
status/uptime.config.ts
T
Michael Kinder fdc16007e3 Restyle the status page in Cottage's brand
The page (pages/, components/, styles/) is rewritten in Cottage's brand, replacing Mantine.
- Brand files: tokens, fonts and component CSS copied from Hearth; logo, pod row, status
  pill and banner ported from the brand handbook.
- Themes: light by default, dark when the OS asks.
- Services: grouped; each has a status pill, uptime and 90 daily bars (30 on phones).
- Bars: each bar has a text label, keyboard navigation and a day card.
- Response-time chart: optional, drawn in brand colours.
- Notices: colour-coded posted notices and planned maintenance.
- Incident history: by month, with the brand's empty state.

The check worker, D1 storage, types and Terraform are untouched, so upstream merges stay
clean. uptime.config.ts lists Cottage's services (website, dashboard, apps in US East).
`npm run dev` shows sample data (?sample=outage|maintenance|empty) since there's no D1.

Deploys are gated on the CLOUDFLARE_DEPLOY repository variable until launch, Wrangler
telemetry is off, and a Check workflow lints, type-checks and builds every pull request.
Removed upstream's issue-translation workflow, funding file and translations.
2026-11-21 14:04:00 -05:00

77 lines
3.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Cottage's status page: what we check and what we've posted.
// A push to main deploys it (see README.md). Field reference: uptime.config.full.ts.
//
// Don't edit this line
import { MaintenanceConfig, PageConfig, WorkerConfig } from './types/config'
const pageConfig: PageConfig = {
title: 'Cottage status',
// Buttons on the right of the header.
links: [
{ link: 'https://cottage.host', label: 'cottage.host' },
{ link: 'https://app.cottage.host', label: 'Your dashboard', highlight: true },
],
// Sections, in order. Every monitor below should appear in exactly one.
group: {
Cottage: ['website', 'dashboard'],
'Apps by region': ['apps-us-east'],
},
}
const workerConfig: WorkerConfig = {
// Checks run every minute from Cloudflare's network (the location nearest the worker).
// The targets go live at launch; until then the page isn't deployed.
monitors: [
{
id: 'website',
name: 'Website',
tooltip: 'cottage.host: pricing, the app catalog and docs',
method: 'GET',
target: 'https://cottage.host',
statusPageLink: 'https://cottage.host',
timeout: 10000,
headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' },
},
{
id: 'dashboard',
name: 'Dashboard and billing',
tooltip: 'Signing in, deploying and managing apps, and top-ups',
method: 'GET',
target: 'https://app.cottage.host/healthz',
statusPageLink: 'https://app.cottage.host',
expectedCodes: [200],
timeout: 10000,
headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' },
},
{
// A small app Cottage runs for itself on the region's servers, so this checks the
// whole path a customer's app takes: Cloudflare, the node's proxy and a running app.
// TODO at launch: deploy the canary app and put its address here.
id: 'apps-us-east',
name: 'Apps in US East',
tooltip: 'Customer apps hosted in Virginia',
method: 'GET',
target: 'https://status-canary-vin1.cottagehost.com/',
timeout: 10000,
headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' },
},
],
// Alerts come from Grafana Cloud (hearth infra/monitoring). A webhook here could page too.
}
// Notices shown on the page: incident updates and planned maintenance. Newest last.
// Write them in Cottage's voice: say what happened, who it affects and what to expect,
// e.g. title 'Apps in US East were slow for 18 minutes'.
// {
// title: 'Some apps in US East aren’t loading',
// body: 'We’re looking into it now. Next update within 30 minutes.',
// monitors: ['apps-us-east'], // listed as "Affects: ..." and their status follows the colour
// start: '2026-12-01T14:05:00Z',
// end: '2026-12-01T14:40:00Z', // leave out while it's ongoing
// color: 'red', // red = outage, yellow = degraded (default), blue = maintenance, green = resolved
// },
const maintenances: MaintenanceConfig[] = []
// Don't edit this line
export { maintenances, pageConfig, workerConfig }