@ -38,7 +38,6 @@ import {
} from './getPanelOptionsWithDefaults' ;
} from './getPanelOptionsWithDefaults' ;
import { QueryGroupOptions } from 'app/types' ;
import { QueryGroupOptions } from 'app/types' ;
import { PanelModelLibraryPanel } from '../../library-panels/types' ;
import { PanelModelLibraryPanel } from '../../library-panels/types' ;
export interface GridPos {
export interface GridPos {
x : number ;
x : number ;
y : number ;
y : number ;
@ -47,6 +46,8 @@ export interface GridPos {
static ? : boolean ;
static ? : boolean ;
}
}
import { TimeOverrideResult } from '../utils/panel' ;
const notPersistedProperties : { [ str : string ] : boolean } = {
const notPersistedProperties : { [ str : string ] : boolean } = {
events : true ,
events : true ,
isViewing : true ,
isViewing : true ,
@ -292,6 +293,23 @@ export class PanelModel implements DataConfigSource {
this . gridPos . h = newPos . h ;
this . gridPos . h = newPos . h ;
}
}
runAllPanelQueries ( dashboardId : number , dashboardTimezone : string , timeData : TimeOverrideResult , width : number ) {
this . getQueryRunner ( ) . run ( {
datasource : this.datasource ,
queries : this.targets ,
panelId : this.editSourceId || this . id ,
dashboardId : dashboardId ,
timezone : dashboardTimezone ,
timeRange : timeData.timeRange ,
timeInfo : timeData.timeInfo ,
maxDataPoints : this.maxDataPoints || width ,
minInterval : this.interval ,
scopedVars : this.scopedVars ,
cacheTimeout : this.cacheTimeout ,
transformations : this.transformations ,
} ) ;
}
refresh() {
refresh() {
this . hasRefreshed = true ;
this . hasRefreshed = true ;
this . events . publish ( new RefreshEvent ( ) ) ;
this . events . publish ( new RefreshEvent ( ) ) ;