feat(15-03): add alert rules UI, alert events table, and notification bell

- AlertRuleFormDialog with rule type selector, threshold input, auto-set units
- AlertRulesTab with list, enable toggle, edit, delete, and add button
- AlertEventsTable with severity badges, resolve action, and state filter tabs
- NotificationBell polls active alert count with 60s interval
- Site dashboard gains Alerts tab rendering both AlertRulesTab and AlertEventsTable
- NotificationBell integrated into ContextStrip header for tenant users

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-19 07:25:24 -05:00
parent 3bddd6f654
commit d1495ee90d
6 changed files with 578 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ import { useUIStore } from '@/lib/store'
import { tenantsApi, metricsApi } from '@/lib/api'
import { useEventStreamContext } from '@/contexts/EventStreamContext'
import type { ConnectionState } from '@/hooks/useEventStream'
import { NotificationBell } from '@/components/alerts/NotificationBell'
const SYSTEM_TENANT_ID = '00000000-0000-0000-0000-000000000000'
@@ -191,6 +192,9 @@ export function ContextStrip() {
{/* Right: Actions */}
<div className="flex items-center gap-2 ml-auto">
{/* Notification bell */}
{tenantId && <NotificationBell tenantId={tenantId} />}
{/* Command palette shortcut */}
<button
onClick={() => useCommandPalette.getState().setOpen(true)}