diff --git a/public/app/features/dashboard-scene/edit-pane/VizPanelEditableElement.tsx b/public/app/features/dashboard-scene/edit-pane/VizPanelEditableElement.tsx index 200357fa881..39ed9beaa52 100644 --- a/public/app/features/dashboard-scene/edit-pane/VizPanelEditableElement.tsx +++ b/public/app/features/dashboard-scene/edit-pane/VizPanelEditableElement.tsx @@ -21,6 +21,7 @@ import { BulkActionElement } from '../scene/types/BulkActionElement'; import { isDashboardLayoutItem } from '../scene/types/DashboardLayoutItem'; import { EditableDashboardElement, EditableDashboardElementInfo } from '../scene/types/EditableDashboardElement'; import { dashboardSceneGraph } from '../utils/dashboardSceneGraph'; +import { DashboardInteractions } from '../utils/interactions'; import { getDashboardSceneFor, getPanelIdForVizPanel } from '../utils/utils'; import { MultiSelectedVizPanelsEditableElement } from './MultiSelectedVizPanelsEditableElement'; @@ -95,6 +96,7 @@ export class VizPanelEditableElement implements EditableDashboardElement, BulkAc public useEditPaneOptions = useEditPaneOptions.bind(this); public onDelete() { + DashboardInteractions.panelActionClicked('duplicate', getPanelIdForVizPanel(this.panel), 'edit_pane'); const layout = dashboardSceneGraph.getLayoutManagerFor(this.panel); layout.removePanel?.(this.panel); } @@ -116,11 +118,13 @@ export class VizPanelEditableElement implements EditableDashboardElement, BulkAc } public onDuplicate() { + DashboardInteractions.panelActionClicked('duplicate', getPanelIdForVizPanel(this.panel), 'edit_pane'); const layout = dashboardSceneGraph.getLayoutManagerFor(this.panel); layout.duplicatePanel?.(this.panel); } public onCopy() { + DashboardInteractions.panelActionClicked('copy', getPanelIdForVizPanel(this.panel), 'edit_pane'); const dashboard = getDashboardSceneFor(this.panel); dashboard.copyPanel(this.panel); } @@ -147,7 +151,9 @@ const OpenPanelEditViz = ({ panel }: OpenPanelEditVizProps) => {