mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -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 React, { PureComponent } from 'react';
|
||||||
|
|
||||||
import { AppEvents, SelectableValue } from '@grafana/data';
|
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 { Button, ClipboardButton, Field, Icon, Input, LinkButton, Modal, Select, Spinner } from '@grafana/ui';
|
||||||
import { appEvents } from 'app/core/core';
|
import { appEvents } from 'app/core/core';
|
||||||
import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
import { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';
|
||||||
@ -98,13 +98,16 @@ export class ShareSnapshot extends PureComponent<Props, State> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
try {
|
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({
|
this.setState({
|
||||||
deleteUrl: results.deleteUrl,
|
deleteUrl: results.deleteUrl,
|
||||||
snapshotUrl: results.url,
|
snapshotUrl: results.url,
|
||||||
step: 2,
|
step: 2,
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
|
reportInteraction('grafana_dashboards_snapshot_created', {
|
||||||
|
location: external ? 'raintank' : 'local',
|
||||||
|
});
|
||||||
this.setState({ isLoading: false });
|
this.setState({ isLoading: false });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user