Commit be8097fc by Dominik Prokop Committed by GitHub

Snapshots: store DataFrameDTO instead of MutableDataFrame in snapshot data (#19247)

parent da3587a6
...@@ -14,7 +14,7 @@ import templateSrv from 'app/features/templating/template_srv'; ...@@ -14,7 +14,7 @@ import templateSrv from 'app/features/templating/template_srv';
import config from 'app/core/config'; import config from 'app/core/config';
// Types // Types
import { DashboardModel, PanelModel } from '../state'; import { DashboardModel, PanelModel } from '../state';
import { LoadingState, ScopedVars, AbsoluteTimeRange, toUtc } from '@grafana/data'; import { LoadingState, ScopedVars, AbsoluteTimeRange, toUtc, toDataFrameDTO } from '@grafana/data';
const DEFAULT_PLUGIN_ERROR = 'Error in plugin'; const DEFAULT_PLUGIN_ERROR = 'Error in plugin';
...@@ -129,7 +129,7 @@ export class PanelChrome extends PureComponent<Props, State> { ...@@ -129,7 +129,7 @@ export class PanelChrome extends PureComponent<Props, State> {
if (data.state === LoadingState.Done) { if (data.state === LoadingState.Done) {
// If we are doing a snapshot save data in panel model // If we are doing a snapshot save data in panel model
if (this.props.dashboard.snapshot) { if (this.props.dashboard.snapshot) {
this.props.panel.snapshotData = data.series; this.props.panel.snapshotData = data.series.map(frame => toDataFrameDTO(frame));
} }
if (isFirstLoad) { if (isFirstLoad) {
isFirstLoad = false; isFirstLoad = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment