ExportJson: Add missing tracking in copy to clipboard button (#97000)

This commit is contained in:
Juan Cabanas 2024-11-25 15:34:38 -03:00 committed by GitHub
parent 18c8ed3088
commit 150352930d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,7 @@ import { createSuccessNotification } from 'app/core/copy/appNotification';
import { t, Trans } from 'app/core/internationalization';
import { dispatch } from 'app/store/store';
import { DashboardInteractions } from '../../utils/interactions';
import { ShareExportTab } from '../ShareExportTab';
const selector = e2eSelectors.pages.ExportDashboardDrawer.ExportAsJson;
@ -94,6 +95,9 @@ function ExportAsJsonRenderer({ model }: SceneComponentProps<ExportAsJson>) {
icon="copy"
disabled={dashboardJson.loading}
getText={() => dashboardJson.value ?? ''}
onClipboardCopy={() => {
DashboardInteractions.exportCopyJsonClicked();
}}
>
<Trans i18nKey="export.json.copy-button">Copy to clipboard</Trans>
</ClipboardButton>