mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
add tracking for snapshot creation (#49165)
This commit is contained in:
parent
f0496955e3
commit
3ace282c29
@ -1,7 +1,7 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
|
||||
import { AppEvents, SelectableValue } from '@grafana/data';
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
import { getBackendSrv, reportInteraction } from '@grafana/runtime';
|
||||
import { Button, ClipboardButton, Field, Icon, Input, LinkButton, Modal, Select, Spinner } from '@grafana/ui';
|
||||
import { appEvents } from 'app/core/core';
|
||||
import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||
@ -98,13 +98,16 @@ export class ShareSnapshot extends PureComponent<Props, State> {
|
||||
};
|
||||
|
||||
try {
|
||||
const results: { deleteUrl: any; url: any } = await getBackendSrv().post(snapshotApiUrl, cmdData);
|
||||
const results: { deleteUrl: string; url: string } = await getBackendSrv().post(snapshotApiUrl, cmdData);
|
||||
this.setState({
|
||||
deleteUrl: results.deleteUrl,
|
||||
snapshotUrl: results.url,
|
||||
step: 2,
|
||||
});
|
||||
} finally {
|
||||
reportInteraction('grafana_dashboards_snapshot_created', {
|
||||
location: external ? 'raintank' : 'local',
|
||||
});
|
||||
this.setState({ isLoading: false });
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user