[v9.5.x] [Chore] Dashboard: Update analytic events for new panel/row/import/pasted panel (#67215)
[Chore] Dashboard: Update analytic events for new panel/row/import/pasted panel (#67205)
update analytic events for new panel/row/import/pasted panel
(cherry picked from commit 2f1a08511a)
Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
This commit is contained in:
co-authored by
Polina Boneva
polinaboneva
parent
fc10666f03
commit
8cac9b28a0
+1
-3
@@ -1,8 +1,6 @@
|
||||
{
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"packages": ["packages/*"],
|
||||
"version": "9.5.2"
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
|
||||
label={t('dashboard.add-menu.row', 'Row')}
|
||||
testId={selectors.components.PageToolbar.itemButton('Add new row menu item')}
|
||||
onClick={() => {
|
||||
reportInteraction('Create new row');
|
||||
reportInteraction('dashboards_toolbar_add_clicked', { item: 'add_row' });
|
||||
onCreateNewRow(dashboard);
|
||||
}}
|
||||
/>
|
||||
@@ -52,7 +52,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
|
||||
label={t('dashboard.add-menu.import', 'Import from library')}
|
||||
testId={selectors.components.PageToolbar.itemButton('Add new panel from panel library menu item')}
|
||||
onClick={() => {
|
||||
reportInteraction('Add a panel from the panel library');
|
||||
reportInteraction('dashboards_toolbar_add_clicked', { item: 'import_from_library' });
|
||||
onAddLibraryPanel(dashboard);
|
||||
}}
|
||||
/>
|
||||
@@ -61,7 +61,7 @@ export const AddPanelMenu = ({ dashboard }: Props) => {
|
||||
label={t('dashboard.add-menu.paste-panel', 'Paste panel')}
|
||||
testId={selectors.components.PageToolbar.itemButton('Add new panel from clipboard menu item')}
|
||||
onClick={() => {
|
||||
reportInteraction('Paste panel from clipboard');
|
||||
reportInteraction('dashboards_toolbar_add_clicked', { item: 'paste_panel' });
|
||||
onPasteCopiedPanel(dashboard, copiedPanelPlugin);
|
||||
}}
|
||||
disabled={!copiedPanelPlugin}
|
||||
|
||||
@@ -64,7 +64,7 @@ export const DashboardEmpty = ({ dashboard, canCreate }: Props) => {
|
||||
fill="outline"
|
||||
aria-label="Add new row"
|
||||
onClick={() => {
|
||||
reportInteraction('Create new row');
|
||||
reportInteraction('dashboards_emptydashboard_clicked', { item: 'add_row' });
|
||||
onCreateNewRow(dashboard);
|
||||
}}
|
||||
disabled={!canCreate}
|
||||
@@ -86,7 +86,7 @@ export const DashboardEmpty = ({ dashboard, canCreate }: Props) => {
|
||||
fill="outline"
|
||||
aria-label="Add new panel from panel library"
|
||||
onClick={() => {
|
||||
reportInteraction('Add a panel from the panel library');
|
||||
reportInteraction('dashboards_emptydashboard_clicked', { item: 'import_from_library' });
|
||||
onAddLibraryPanel(dashboard);
|
||||
}}
|
||||
disabled={!canCreate}
|
||||
|
||||
Reference in New Issue
Block a user