From bb17193ce5aebcfc19cc46322f7f1468abe8380f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Wed, 8 Dec 2021 10:11:01 +0100 Subject: [PATCH] Variables: Adds user interaction reports (#42802) * Variables: Adds user interaction reports * Chore: updates after PR feedback --- .../DashboardSettings/DashboardSettings.tsx | 9 ++++++--- .../features/variables/editor/VariableEditorList.tsx | 2 ++ .../variables/editor/VariableEditorListRow.tsx | 3 +++ .../variables/inspect/VariableUsagesButton.tsx | 12 +++++++++++- .../inspect/VariablesDependenciesButton.tsx | 12 ++++++++++-- 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/public/app/features/dashboard/components/DashboardSettings/DashboardSettings.tsx b/public/app/features/dashboard/components/DashboardSettings/DashboardSettings.tsx index 757ae1a4491..dd8d6763e86 100644 --- a/public/app/features/dashboard/components/DashboardSettings/DashboardSettings.tsx +++ b/public/app/features/dashboard/components/DashboardSettings/DashboardSettings.tsx @@ -6,7 +6,7 @@ import config from 'app/core/config'; import { contextSrv } from 'app/core/services/context_srv'; import { dashboardWatcher } from 'app/features/live/dashboard/dashboardWatcher'; import { DashboardModel } from '../../state/DashboardModel'; -import { SaveDashboardButton, SaveDashboardAsButton } from '../SaveDashboard/SaveDashboardButton'; +import { SaveDashboardAsButton, SaveDashboardButton } from '../SaveDashboard/SaveDashboardButton'; import { VariableEditorContainer } from '../../../variables/editor/VariableEditorContainer'; import { DashboardPermissions } from '../DashboardPermissions/DashboardPermissions'; import { GeneralSettings } from './GeneralSettings'; @@ -15,7 +15,7 @@ import { LinksSettings } from './LinksSettings'; import { VersionsSettings } from './VersionsSettings'; import { JsonEditorSettings } from './JsonEditorSettings'; import { GrafanaTheme2, locationUtil } from '@grafana/data'; -import { locationService } from '@grafana/runtime'; +import { locationService, reportInteraction } from '@grafana/runtime'; export interface Props { dashboard: DashboardModel; @@ -138,7 +138,10 @@ export function DashboardSettings({ dashboard, editview }: Props) {