Ver Fonte

adjusting types to match

Peter Holmberg há 7 anos atrás
pai
commit
4b47e857f2

+ 1 - 1
public/app/features/dashboard/dashgrid/PanelChrome.tsx

@@ -86,7 +86,7 @@ export class PanelChrome extends PureComponent<Props, State> {
 
 
   onDataResponse = (dataQueryResponse: DataQueryResponse) => {
   onDataResponse = (dataQueryResponse: DataQueryResponse) => {
     if (this.props.dashboard.isSnapshot()) {
     if (this.props.dashboard.isSnapshot()) {
-      this.props.panel.snapshotData = dataQueryResponse;
+      this.props.panel.snapshotData = dataQueryResponse.data;
     }
     }
   };
   };
 
 

+ 2 - 2
public/app/features/dashboard/panel_model.ts

@@ -4,7 +4,7 @@ import _ from 'lodash';
 // Types
 // Types
 import { Emitter } from 'app/core/utils/emitter';
 import { Emitter } from 'app/core/utils/emitter';
 import { PANEL_OPTIONS_KEY_PREFIX } from 'app/core/constants';
 import { PANEL_OPTIONS_KEY_PREFIX } from 'app/core/constants';
-import { DataQuery, DataQueryResponse } from '@grafana/ui/src/types';
+import { DataQuery, TimeSeries } from '@grafana/ui';
 
 
 export interface GridPos {
 export interface GridPos {
   x: number;
   x: number;
@@ -87,7 +87,7 @@ export class PanelModel {
   datasource: string;
   datasource: string;
   thresholds?: any;
   thresholds?: any;
 
 
-  snapshotData?: DataQueryResponse;
+  snapshotData?: TimeSeries[];
   timeFrom?: any;
   timeFrom?: any;
   timeShift?: any;
   timeShift?: any;
   hideTimeOverride?: any;
   hideTimeOverride?: any;