feat(ui/alerts): register /alerts/* routes with placeholder pages
Adds 6 lazy-loaded route entries for the alerting UI (Inbox, All, History, Rules list, Rule editor wizard, Silences) plus an `/alerts` → `/alerts/inbox` redirect. Page components are placeholder stubs to be replaced in Phase 5/6/7. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
3
ui/src/pages/Alerts/AllAlertsPage.tsx
Normal file
3
ui/src/pages/Alerts/AllAlertsPage.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function AllAlertsPage() {
|
||||
return <div>AllAlertsPage — coming soon</div>;
|
||||
}
|
||||
3
ui/src/pages/Alerts/HistoryPage.tsx
Normal file
3
ui/src/pages/Alerts/HistoryPage.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function HistoryPage() {
|
||||
return <div>HistoryPage — coming soon</div>;
|
||||
}
|
||||
3
ui/src/pages/Alerts/InboxPage.tsx
Normal file
3
ui/src/pages/Alerts/InboxPage.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function InboxPage() {
|
||||
return <div>InboxPage — coming soon</div>;
|
||||
}
|
||||
3
ui/src/pages/Alerts/RuleEditor/RuleEditorWizard.tsx
Normal file
3
ui/src/pages/Alerts/RuleEditor/RuleEditorWizard.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function RuleEditorWizard() {
|
||||
return <div>RuleEditorWizard — coming soon</div>;
|
||||
}
|
||||
3
ui/src/pages/Alerts/RulesListPage.tsx
Normal file
3
ui/src/pages/Alerts/RulesListPage.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function RulesListPage() {
|
||||
return <div>RulesListPage — coming soon</div>;
|
||||
}
|
||||
3
ui/src/pages/Alerts/SilencesPage.tsx
Normal file
3
ui/src/pages/Alerts/SilencesPage.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function SilencesPage() {
|
||||
return <div>SilencesPage — coming soon</div>;
|
||||
}
|
||||
@@ -23,6 +23,12 @@ const OutboundConnectionEditor = lazy(() => import('./pages/Admin/OutboundConnec
|
||||
const SensitiveKeysPage = lazy(() => import('./pages/Admin/SensitiveKeysPage'));
|
||||
const AppsTab = lazy(() => import('./pages/AppsTab/AppsTab'));
|
||||
const SwaggerPage = lazy(() => import('./pages/Swagger/SwaggerPage'));
|
||||
const InboxPage = lazy(() => import('./pages/Alerts/InboxPage'));
|
||||
const AllAlertsPage = lazy(() => import('./pages/Alerts/AllAlertsPage'));
|
||||
const HistoryPage = lazy(() => import('./pages/Alerts/HistoryPage'));
|
||||
const RulesListPage = lazy(() => import('./pages/Alerts/RulesListPage'));
|
||||
const RuleEditorWizard = lazy(() => import('./pages/Alerts/RuleEditor/RuleEditorWizard'));
|
||||
const SilencesPage = lazy(() => import('./pages/Alerts/SilencesPage'));
|
||||
|
||||
function SuspenseWrapper({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
@@ -75,6 +81,16 @@ export const router = createBrowserRouter([
|
||||
{ path: 'apps/new', element: <SuspenseWrapper><AppsTab /></SuspenseWrapper> },
|
||||
{ path: 'apps/:appId', element: <SuspenseWrapper><AppsTab /></SuspenseWrapper> },
|
||||
|
||||
// Alerts
|
||||
{ path: 'alerts', element: <Navigate to="/alerts/inbox" replace /> },
|
||||
{ path: 'alerts/inbox', element: <SuspenseWrapper><InboxPage /></SuspenseWrapper> },
|
||||
{ path: 'alerts/all', element: <SuspenseWrapper><AllAlertsPage /></SuspenseWrapper> },
|
||||
{ path: 'alerts/history', element: <SuspenseWrapper><HistoryPage /></SuspenseWrapper> },
|
||||
{ path: 'alerts/rules', element: <SuspenseWrapper><RulesListPage /></SuspenseWrapper> },
|
||||
{ path: 'alerts/rules/new', element: <SuspenseWrapper><RuleEditorWizard /></SuspenseWrapper> },
|
||||
{ path: 'alerts/rules/:id', element: <SuspenseWrapper><RuleEditorWizard /></SuspenseWrapper> },
|
||||
{ path: 'alerts/silences', element: <SuspenseWrapper><SilencesPage /></SuspenseWrapper> },
|
||||
|
||||
// Admin (ADMIN role required)
|
||||
{
|
||||
element: <RequireAdmin />,
|
||||
|
||||
Reference in New Issue
Block a user