Skip to content

Commit 1e3a5ef

Browse files
authored
fix(widget-builder): Typo in route check (#92147)
Widget Builder doesn't open when adding to a new dashboard. This is because there's a small difference in routes. New dashboards have `/dashboards/` vs `/dashboard/` in detail views. This fixes the widget builder opening having issues on single tenant instances where the domain isn't the nice `org_slug.sentry.io` format.
1 parent 1285876 commit 1e3a5ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

static/app/views/dashboards/detail.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,18 +444,18 @@ class DashboardDetail extends Component<Props, State> {
444444
const {dashboardId, widgetIndex} = params;
445445

446446
const widgetBuilderRoutes = [
447-
`/organizations/${organization.slug}/dashboard/new/widget-builder/widget/new/`,
447+
`/organizations/${organization.slug}/dashboards/new/widget-builder/widget/new/`,
448+
`/organizations/${organization.slug}/dashboards/new/widget-builder/widget/${widgetIndex}/edit/`,
448449
`/organizations/${organization.slug}/dashboard/${dashboardId}/widget-builder/widget/new/`,
449-
`/organizations/${organization.slug}/dashboard/new/widget-builder/widget/${widgetIndex}/edit/`,
450450
`/organizations/${organization.slug}/dashboard/${dashboardId}/widget-builder/widget/${widgetIndex}/edit/`,
451451
];
452452

453453
if (USING_CUSTOMER_DOMAIN) {
454454
widgetBuilderRoutes.push(
455455
...[
456456
`/dashboards/new/widget-builder/widget/new/`,
457-
`/dashboard/${dashboardId}/widget-builder/widget/new/`,
458457
`/dashboards/new/widget-builder/widget/${widgetIndex}/edit/`,
458+
`/dashboard/${dashboardId}/widget-builder/widget/new/`,
459459
`/dashboard/${dashboardId}/widget-builder/widget/${widgetIndex}/edit/`,
460460
]
461461
);

0 commit comments

Comments
 (0)