Skip to content

Commit 4b5fbf6

Browse files
ref(new-widget-builder-experience): Add visualization & query fields (#31786)
1 parent 8f24da7 commit 4b5fbf6

File tree

7 files changed

+406
-114
lines changed

7 files changed

+406
-114
lines changed

static/app/views/dashboardsV2/dashboard.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import theme from 'sentry/utils/theme';
2727
import withApi from 'sentry/utils/withApi';
2828
import withPageFilters from 'sentry/utils/withPageFilters';
2929

30-
import {DataSet} from './widgetBuilder/utils';
3130
import AddWidget, {ADD_WIDGET_BUTTON_DRAG_ID} from './addWidget';
3231
import {
3332
assignDefaultLayout,
@@ -251,7 +250,7 @@ class Dashboard extends Component<Props, State> {
251250
pathname: `/organizations/${organization.slug}/dashboard/${paramDashboardId}/widget/new/`,
252251
query: {
253252
...location.query,
254-
dataSet: DataSet.EVENTS,
253+
source: DashboardWidgetSource.DASHBOARDS,
255254
},
256255
});
257256
return;
@@ -261,7 +260,7 @@ class Dashboard extends Component<Props, State> {
261260
pathname: `/organizations/${organization.slug}/dashboards/new/widget/new/`,
262261
query: {
263262
...location.query,
264-
dataSet: DataSet.EVENTS,
263+
source: DashboardWidgetSource.DASHBOARDS,
265264
},
266265
});
267266
};
@@ -321,7 +320,7 @@ class Dashboard extends Component<Props, State> {
321320
}
322321
};
323322

324-
handleEditWidget = (widget: Widget, index: number) => () => {
323+
handleEditWidget = (widget: Widget) => () => {
325324
const {
326325
organization,
327326
dashboard,
@@ -338,20 +337,20 @@ class Dashboard extends Component<Props, State> {
338337

339338
if (paramDashboardId) {
340339
router.push({
341-
pathname: `/organizations/${organization.slug}/dashboard/${paramDashboardId}/widget/${index}/edit/`,
340+
pathname: `/organizations/${organization.slug}/dashboard/${paramDashboardId}/widget/${widget.id}/edit/`,
342341
query: {
343342
...location.query,
344-
dataSet: DataSet.EVENTS,
343+
source: DashboardWidgetSource.DASHBOARDS,
345344
},
346345
});
347346
return;
348347
}
349348

350349
router.push({
351-
pathname: `/organizations/${organization.slug}/dashboards/new/widget/${index}/edit/`,
350+
pathname: `/organizations/${organization.slug}/dashboards/new/widget/${widget.id}/edit/`,
352351
query: {
353352
...location.query,
354-
dataSet: DataSet.EVENTS,
353+
source: DashboardWidgetSource.DASHBOARDS,
355354
},
356355
});
357356
}
@@ -391,7 +390,7 @@ class Dashboard extends Component<Props, State> {
391390
isEditing,
392391
widgetLimitReached,
393392
onDelete: this.handleDeleteWidget(widget),
394-
onEdit: this.handleEditWidget(widget, index),
393+
onEdit: this.handleEditWidget(widget),
395394
onDuplicate: this.handleDuplicateWidget(widget, index),
396395
isPreview,
397396
};

static/app/views/dashboardsV2/widgetBuilder/buildStep.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,4 @@ const SubHeading = styled('small')`
4646

4747
const Content = styled('div')`
4848
display: grid;
49-
grid-template-columns: 1fr max-content;
5049
`;

0 commit comments

Comments
 (0)