From 2f113a082d2b6fc642418b405c90bb7998d708a9 Mon Sep 17 00:00:00 2001 From: lyc8503 Date: Sun, 27 Apr 2025 03:06:31 +0800 Subject: [PATCH] update example config --- uptime.config.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/uptime.config.ts b/uptime.config.ts index 70f0e7b..6af3494 100644 --- a/uptime.config.ts +++ b/uptime.config.ts @@ -1,4 +1,4 @@ -import { Maintenances, PageConfig, WorkerConfig } from './types/config' +import { MaintenanceConfig, PageConfig, WorkerConfig } from './types/config' const pageConfig: PageConfig = { // Title for your status page @@ -119,7 +119,23 @@ const workerConfig: WorkerConfig = { }, } -const maintenances: Maintenances[] = [] +const maintenances: MaintenanceConfig[] = [ + { + // Monitor IDs to be affected by this maintenance + monitors: ['foo_monitor', 'bar_monitor'], + // [Optional] default to "Scheduled Maintenance" if not specified + title: 'Test Maintenance', + // Description of the maintenance, will be shown at status page + body: 'This is a test maintenance, server software upgrade', + // Start time of the maintenance, in UNIX timestamp or ISO 8601 format + start: '2025-04-27T00:00:00+08:00', + // [Optional] end time of the maintenance, in UNIX timestamp or ISO 8601 format + // if not specified, the maintenance will be considered as on-going + end: '2025-04-30T00:00:00+08:00', + // [Optional] color of the maintenance alert at status page, default to "yellow" + color: 'blue', + }, +] // Don't forget this, otherwise compilation fails. export { pageConfig, workerConfig, maintenances }