|
@@ -1,39 +1,3 @@
|
|
|
-// The add/edit widget modal is currently being ported to the widget builder full-page and
|
|
|
-// this will be removed once that is done.
|
|
|
-type DashboardsEventParametersAddWidgetModal = {
|
|
|
- 'dashboards_views.add_widget_modal.change': {
|
|
|
- field: string;
|
|
|
- from: string;
|
|
|
- value: string;
|
|
|
- widget_type: string;
|
|
|
- };
|
|
|
- 'dashboards_views.add_widget_modal.confirm': {
|
|
|
- data_set: string;
|
|
|
- };
|
|
|
- 'dashboards_views.add_widget_modal.opened': {};
|
|
|
- 'dashboards_views.add_widget_modal.save': {
|
|
|
- data_set: string;
|
|
|
- };
|
|
|
- 'dashboards_views.edit_widget_modal.confirm': {};
|
|
|
- 'dashboards_views.edit_widget_modal.opened': {};
|
|
|
-};
|
|
|
-
|
|
|
-const dashboardsEventMapAddWidgetModal: Record<
|
|
|
- keyof DashboardsEventParametersAddWidgetModal,
|
|
|
- string | null
|
|
|
-> = {
|
|
|
- 'dashboards_views.edit_widget_modal.confirm':
|
|
|
- 'Dashboards2: Edit Dashboard Widget modal form submitted',
|
|
|
- 'dashboards_views.edit_widget_modal.opened': 'Dashboards2: Edit Widget Modal Opened',
|
|
|
- 'dashboards_views.add_widget_modal.opened': 'Dashboards2: Add Widget Modal opened',
|
|
|
- 'dashboards_views.add_widget_modal.change':
|
|
|
- 'Dashboards2: Field changed in Add Widget Modal',
|
|
|
- 'dashboards_views.add_widget_modal.confirm':
|
|
|
- 'Dashboards2: Add Widget to Dashboard modal form submitted',
|
|
|
- 'dashboards_views.add_widget_modal.save':
|
|
|
- 'Dashboards2: Widget saved directly to Dashboard from Add Widget to Dashboard modal',
|
|
|
-};
|
|
|
-
|
|
|
// Used in the full-page widget builder
|
|
|
type DashboardsEventParametersWidgetBuilder = {
|
|
|
'dashboards_views.widget_builder.change': {
|
|
@@ -96,16 +60,10 @@ export type DashboardsEventParameters = {
|
|
|
'dashboards_views.query_selector.selected': {
|
|
|
widget_type: string;
|
|
|
};
|
|
|
- 'dashboards_views.widget_library.add': {
|
|
|
- num_widgets: number;
|
|
|
- };
|
|
|
'dashboards_views.widget_library.add_widget': {
|
|
|
title: string;
|
|
|
};
|
|
|
'dashboards_views.widget_library.opened': {};
|
|
|
- 'dashboards_views.widget_library.switch_tab': {
|
|
|
- to: string;
|
|
|
- };
|
|
|
'dashboards_views.widget_viewer.edit': {
|
|
|
display_type: string;
|
|
|
widget_type: string;
|
|
@@ -140,8 +98,7 @@ export type DashboardsEventParameters = {
|
|
|
display_type: string;
|
|
|
widget_type: string;
|
|
|
};
|
|
|
-} & DashboardsEventParametersAddWidgetModal &
|
|
|
- DashboardsEventParametersWidgetBuilder;
|
|
|
+} & DashboardsEventParametersWidgetBuilder;
|
|
|
|
|
|
export type DashboardsEventKey = keyof DashboardsEventParameters;
|
|
|
|
|
@@ -157,11 +114,8 @@ export const dashboardsEventMap: Record<DashboardsEventKey, string | null> = {
|
|
|
'dashboards_views.query_selector.selected':
|
|
|
'Dashboards2: Query selected in Query Selector',
|
|
|
'dashboards_views.open_in_discover.opened': 'Dashboards2: Widget Opened In Discover',
|
|
|
- 'dashboards_views.widget_library.add': 'Dashboards2: Number of prebuilt widgets added',
|
|
|
'dashboards_views.widget_library.add_widget':
|
|
|
'Dashboards2: Title of prebuilt widget added',
|
|
|
- 'dashboards_views.widget_library.switch_tab':
|
|
|
- 'Dashboards2: Widget Library tab switched',
|
|
|
'dashboards_views.widget_library.opened': 'Dashboards2: Add Widget Library opened',
|
|
|
'dashboards_manage.search': 'Dashboards Manager: Search',
|
|
|
'dashboards_manage.change_sort': 'Dashboards Manager: Sort By Changed',
|
|
@@ -181,6 +135,5 @@ export const dashboardsEventMap: Record<DashboardsEventKey, string | null> = {
|
|
|
'dashboards_views.widget_viewer.sort': 'Widget Viewer: Table Sorted',
|
|
|
'dashboards_views.widget_viewer.toggle_legend': 'Widget Viewer: Legend Toggled',
|
|
|
'dashboards_views.widget_viewer.zoom': 'Widget Viewer: Chart zoomed',
|
|
|
- ...dashboardsEventMapAddWidgetModal,
|
|
|
...dashboardsEventMapWidgetBuilder,
|
|
|
};
|