mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
FileImport: add interaction reporting for dropping files (#67512)
add interaction reporting for dragndrop
This commit is contained in:
parent
e88e50efe4
commit
149adb0992
@ -16,7 +16,7 @@ import {
|
||||
formattedValueToString,
|
||||
} from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { config, locationService } from '@grafana/runtime';
|
||||
import { config, locationService, reportInteraction } from '@grafana/runtime';
|
||||
import { Icon, Themeable2, withTheme2 } from '@grafana/ui';
|
||||
import { notifyApp } from 'app/core/actions';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
@ -166,6 +166,16 @@ export class UnthemedDashboardPage extends PureComponent<Props, State> {
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
reportInteraction('dashboards_dropped_files', {
|
||||
number_of_files: fileRejections.length + acceptedFiles.length,
|
||||
accepted_files: acceptedFiles.map((a) => {
|
||||
return { type: a.type, size: a.size };
|
||||
}),
|
||||
rejected_files: fileRejections.map((r) => {
|
||||
return { type: r.file.type, size: r.file.size };
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
getCleanState(): State {
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
getValueFormat,
|
||||
formattedValueToString,
|
||||
} from '@grafana/data';
|
||||
import { config, getBackendSrv, getDataSourceSrv } from '@grafana/runtime';
|
||||
import { config, getBackendSrv, getDataSourceSrv, reportInteraction } from '@grafana/runtime';
|
||||
import {
|
||||
InlineField,
|
||||
Select,
|
||||
@ -391,6 +391,16 @@ export class UnthemedQueryEditor extends PureComponent<Props, State> {
|
||||
snapshot,
|
||||
});
|
||||
this.props.onRunQuery();
|
||||
|
||||
reportInteraction('grafana_datasource_drop_files', {
|
||||
number_of_files: fileRejections.length + acceptedFiles.length,
|
||||
accepted_files: acceptedFiles.map((a) => {
|
||||
return { type: a.type, size: a.size };
|
||||
}),
|
||||
rejected_files: fileRejections.map((r) => {
|
||||
return { type: r.file.type, size: r.file.size };
|
||||
}),
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user