Annotations: Turns on annotations in Graph and TimeSeries (#33402)

* Annotations: Turns on annotations in Graph and TimeSeries

* Refactor: moves to notPersistedProperties
This commit is contained in:
Hugo Häggmark
2021-04-27 07:39:02 +02:00
committed by GitHub
parent 495345c0c2
commit a3584f21de
4 changed files with 8 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ import {
EventBusSrv,
FieldConfigSource,
PanelPlugin,
PanelPluginDataSupport,
ScopedVars,
urlUtil,
} from '@grafana/data';
@@ -61,6 +62,7 @@ const notPersistedProperties: { [str: string]: boolean } = {
editSourceId: true,
configRev: true,
getDisplayTitle: true,
dataSupport: true,
};
// For angular panels we need to clean up properties when changing type
@@ -171,6 +173,7 @@ export class PanelModel implements DataConfigSource {
declare cachedPluginOptions: Record<string, PanelOptionsCache>;
legend?: { show: boolean; sort?: string; sortDesc?: boolean };
plugin?: PanelPlugin;
dataSupport?: PanelPluginDataSupport;
private queryRunner?: PanelQueryRunner;
@@ -354,6 +357,7 @@ export class PanelModel implements DataConfigSource {
}
}
this.dataSupport = plugin.dataSupport;
this.applyPluginOptionDefaults(plugin, false);
this.resendLastResult();
}