diff --git a/public/app/features/dashboard/utils/getPanelMenu.ts b/public/app/features/dashboard/utils/getPanelMenu.ts index 8f2a2610a7a..339281c4c45 100644 --- a/public/app/features/dashboard/utils/getPanelMenu.ts +++ b/public/app/features/dashboard/utils/getPanelMenu.ts @@ -43,6 +43,7 @@ export function getPanelMenu( locationService.partial({ viewPanel: panel.id, }); + reportInteraction('dashboards_panelheader_view_clicked'); }; const onEditPanel = (event: React.MouseEvent) => { @@ -50,21 +51,25 @@ export function getPanelMenu( locationService.partial({ editPanel: panel.id, }); + reportInteraction('dashboards_panelheader_edit_clicked'); }; const onSharePanel = (event: React.MouseEvent) => { event.preventDefault(); sharePanel(dashboard, panel); + reportInteraction('dashboards_panelheader_share_clicked'); }; const onAddLibraryPanel = (event: React.MouseEvent) => { event.preventDefault(); addLibraryPanel(dashboard, panel); + reportInteraction('dashboards_panelheader_createlibrarypanel_clicked'); }; const onUnlinkLibraryPanel = (event: React.MouseEvent) => { event.preventDefault(); unlinkLibraryPanel(panel); + reportInteraction('dashboards_panelheader_unlinklibrarypanel_clicked'); }; const onInspectPanel = (tab?: InspectTab) => { @@ -72,10 +77,7 @@ export function getPanelMenu( inspect: panel.id, inspectTab: tab, }); - - reportInteraction('grafana_panel_menu_inspect', { - tab: tab ?? InspectTab.Data, - }); + reportInteraction('dashboards_panelheader_inspect_clicked', { tab: tab ?? InspectTab.Data }); }; const onMore = (event: React.MouseEvent) => { @@ -85,16 +87,19 @@ export function getPanelMenu( const onDuplicatePanel = (event: React.MouseEvent) => { event.preventDefault(); duplicatePanel(dashboard, panel); + reportInteraction('dashboards_panelheader_duplicate_clicked'); }; const onCopyPanel = (event: React.MouseEvent) => { event.preventDefault(); copyPanel(panel); + reportInteraction('dashboards_panelheader_copy_clicked'); }; const onRemovePanel = (event: React.MouseEvent) => { event.preventDefault(); removePanel(dashboard, panel, true); + reportInteraction('dashboards_panelheader_remove_clicked'); }; const onNavigateToExplore = (event: React.MouseEvent) => { @@ -102,16 +107,19 @@ export function getPanelMenu( const openInNewWindow = event.ctrlKey || event.metaKey ? (url: string) => window.open(`${config.appSubUrl}${url}`) : undefined; store.dispatch(navigateToExplore(panel, { getDataSourceSrv, getTimeSrv, getExploreUrl, openInNewWindow }) as any); + reportInteraction('dashboards_panelheader_explore_clicked'); }; const onToggleLegend = (event: React.MouseEvent) => { event.preventDefault(); toggleLegend(panel); + reportInteraction('dashboards_panelheader_togglelegend_clicked'); }; const onCancelStreaming = (event: React.MouseEvent) => { event.preventDefault(); panel.getQueryRunner().cancelQuery(); + reportInteraction('dashboards_panelheader_cancelstreaming_clicked'); }; const menu: PanelMenuItem[] = [];