mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Support for alerting for react panels, and lots of fixes to alert annotations for both react and angular (#33608)
* Alerting: Support for alerting for react panels, and lots of fixes to alert annotations for both react and angular * Fix showing annotations in panel edit
This commit is contained in:
@@ -173,7 +173,6 @@ export class PanelModel implements DataConfigSource {
|
||||
cachedPluginOptions: Record<string, PanelOptionsCache> = {};
|
||||
legend?: { show: boolean; sort?: string; sortDesc?: boolean };
|
||||
plugin?: PanelPlugin;
|
||||
dataSupport?: PanelPluginDataSupport;
|
||||
|
||||
/**
|
||||
* The PanelModel event bus only used for internal and legacy angular support.
|
||||
@@ -355,7 +354,6 @@ export class PanelModel implements DataConfigSource {
|
||||
}
|
||||
}
|
||||
|
||||
this.dataSupport = plugin.dataSupport;
|
||||
this.applyPluginOptionDefaults(plugin, false);
|
||||
this.resendLastResult();
|
||||
}
|
||||
@@ -484,6 +482,10 @@ export class PanelModel implements DataConfigSource {
|
||||
};
|
||||
}
|
||||
|
||||
getDataSupport(): PanelPluginDataSupport {
|
||||
return this.plugin?.dataSupport ?? { annotations: false, alertStates: false };
|
||||
}
|
||||
|
||||
getQueryRunner(): PanelQueryRunner {
|
||||
if (!this.queryRunner) {
|
||||
this.queryRunner = new PanelQueryRunner(this);
|
||||
|
||||
Reference in New Issue
Block a user