Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 71 additions & 16 deletions static/app/router/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import withDomainRequired from 'sentry/utils/withDomainRequired';
import {
WorkflowEngineRedirectToAutomationDetails,
WorkflowEngineRedirectToAutomationEdit,
WorkflowEngineRedirectToDetectorCreate,
WorkflowEngineRedirectToDetectorDetails,
WorkflowEngineRedirectToDetectorEdit,
} from 'sentry/views/alerts/workflowEngineRedirects';
import App from 'sentry/views/app';
import {AppBodyContent} from 'sentry/views/app/appBodyContent';
Expand Down Expand Up @@ -1475,8 +1478,15 @@ function buildRoutes(): RouteObject[] {
},
{
path: 'details/:ruleId/',
component: make(() => import('sentry/views/alerts/rules/metric/details')),
component: WorkflowEngineRedirectToDetectorDetails,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import should still be lazy

deprecatedRouteProps: true,
children: [
{
index: true,
component: make(() => import('sentry/views/alerts/rules/metric/details')),
deprecatedRouteProps: true,
},
],
},
{
path: ':projectId/',
Expand Down Expand Up @@ -1524,7 +1534,17 @@ function buildRoutes(): RouteObject[] {
children: [
{
path: ':projectId/:detectorId/details/',
component: make(() => import('sentry/views/alerts/rules/uptime/details')),
component: WorkflowEngineRedirectToDetectorDetails,
deprecatedRouteProps: true,
children: [
{
index: true,
component: make(
() => import('sentry/views/alerts/rules/uptime/details')
),
deprecatedRouteProps: true,
},
],
},
{
path: 'existing-or-create/',
Expand Down Expand Up @@ -1570,8 +1590,15 @@ function buildRoutes(): RouteObject[] {
},
{
path: ':ruleId/',
component: make(() => import('sentry/views/alerts/edit')),
component: WorkflowEngineRedirectToDetectorDetails,
deprecatedRouteProps: true,
children: [
{
index: true,
component: make(() => import('sentry/views/alerts/edit')),
deprecatedRouteProps: true,
},
],
},
],
},
Expand All @@ -1587,8 +1614,15 @@ function buildRoutes(): RouteObject[] {
children: [
{
path: ':ruleId/',
component: make(() => import('sentry/views/alerts/edit')),
component: WorkflowEngineRedirectToDetectorEdit,
deprecatedRouteProps: true,
children: [
{
index: true,
component: make(() => import('sentry/views/alerts/edit')),
deprecatedRouteProps: true,
},
],
},
],
},
Expand All @@ -1613,15 +1647,22 @@ function buildRoutes(): RouteObject[] {
},
{
path: 'wizard/',
component: make(() => import('sentry/views/alerts/builder/projectProvider')),
component: WorkflowEngineRedirectToDetectorCreate,
deprecatedRouteProps: true,
children: [
{
index: true,
component: make(() => import('sentry/views/alerts/wizard')),
component: make(() => import('sentry/views/alerts/builder/projectProvider')),
children: [
{
index: true,
component: make(() => import('sentry/views/alerts/wizard')),
deprecatedRouteProps: true,
},
],
deprecatedRouteProps: true,
},
],
deprecatedRouteProps: true,
},
{
path: 'new/',
Expand All @@ -1636,8 +1677,15 @@ function buildRoutes(): RouteObject[] {
},
{
path: ':alertType/',
component: make(() => import('sentry/views/alerts/create')),
component: WorkflowEngineRedirectToDetectorCreate,
deprecatedRouteProps: true,
children: [
{
index: true,
component: make(() => import('sentry/views/alerts/create')),
deprecatedRouteProps: true,
},
],
},
],
},
Expand All @@ -1647,18 +1695,25 @@ function buildRoutes(): RouteObject[] {
},
{
path: ':projectId/',
component: make(() => import('sentry/views/alerts/builder/projectProvider')),
component: WorkflowEngineRedirectToDetectorCreate,
deprecatedRouteProps: true,
children: [
{
path: 'new/',
component: make(() => import('sentry/views/alerts/create')),
deprecatedRouteProps: true,
},
{
path: 'wizard/',
component: make(() => import('sentry/views/alerts/wizard')),
index: true,
component: make(() => import('sentry/views/alerts/builder/projectProvider')),
deprecatedRouteProps: true,
children: [
{
path: 'new/',
component: make(() => import('sentry/views/alerts/create')),
deprecatedRouteProps: true,
},
{
path: 'wizard/',
component: make(() => import('sentry/views/alerts/wizard')),
deprecatedRouteProps: true,
},
],
},
],
},
Expand Down
2 changes: 2 additions & 0 deletions static/app/utils/useParams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {useTestRouteContext} from './useRouteContext';
*/
type ParamKeys =
| 'alertId'
| 'alertType'
| 'apiKey'
| 'appId'
| 'appSlug'
Expand Down Expand Up @@ -42,6 +43,7 @@ type ParamKeys =
| 'release'
| 'relocationUuid'
| 'replaySlug'
| 'ruleId'
| 'scrubbingId'
| 'searchId'
| 'sentryAppSlug'
Expand Down
Loading
Loading