maintenance mode (#101)

* feat: move types

* feat: add maintenance alert

* feat: move to config/base class to have fallback values on missing exports

* fix: wrong import for types

* Revert "fix: wrong import for types"

This reverts commit ca2b2e3a68464cfa1b4aef4d99978de02591df74.

* Revert "feat: move to config/base class to have fallback values on missing exports"

This reverts commit 9932ea2590193aabd248fbba6b2c3a215da45d18.

* fix: imports

* chore: formatting

* fix: handle filtering for global status

* fix: pass props

* fix: ignore active maintenances when sending notifications

* fix: mark as warning when monitor is in maintenance

* fix: title width & warning icon

* fix: remove accordeons again

* alert config/style changes, worker code improve

* update example config

* update example config

* set monitors to be optional

---------

Co-authored-by: lyc8503 <[email protected]>
This commit is contained in:
Bennet Galleinandlyc8503 authored and GitHub committed 2025-05-01 01:09:53 +08:00
1 parent 8a6cde7240
commit a6c8eb6e12
13 files changed
+283 -98

No files matched your search

+3 -3
View File
@@ -1,9 +1,9 @@
import Head from 'next/head'
import { Inter } from 'next/font/google'
import { MonitorState, MonitorTarget } from '@/uptime.types'
import { MonitorState, MonitorTarget } from '@/types/config'
import { KVNamespace } from '@cloudflare/workers-types'
import { pageConfig, workerConfig } from '@/uptime.config'
import { maintenances, pageConfig, workerConfig } from '@/uptime.config'
import OverallStatus from '@/components/OverallStatus'
import Header from '@/components/Header'
import MonitorList from '@/components/MonitorList'
@@ -60,7 +60,7 @@ export default function Home({
</Center>
) : (
<div>
<OverallStatus state={state} />
<OverallStatus state={state} monitors={monitors} maintenances={maintenances} />
<MonitorList monitors={monitors} state={state} />
</div>
)}