mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
QueryHistory: Add tracking for copy query button (#61042)
* QueryHistory: Add tracking for copy query button * add datasources to payload
This commit is contained in:
parent
fafae26068
commit
19c8f45a4b
@ -189,6 +189,11 @@ export function RichHistoryCard(props: Props) {
|
||||
};
|
||||
|
||||
const onCopyQuery = () => {
|
||||
const datasources = [...query.queries.map((q) => q.datasource?.type || 'unknown')];
|
||||
reportInteraction('grafana_explore_query_history_copy_query', {
|
||||
datasources,
|
||||
mixed: Boolean(queryDsInstance?.meta.mixed),
|
||||
});
|
||||
const queriesToCopy = query.queries.map((q) => createQueryText(q, queryDsInstance)).join('\n');
|
||||
copyStringToClipboard(queriesToCopy);
|
||||
dispatch(notifyApp(createSuccessNotification('Query copied to clipboard')));
|
||||
|
Loading…
Reference in New Issue
Block a user