EventBus: add origin to all events and support nested EventBus (#33548)

This commit is contained in:
Ryan McKinley
2021-04-30 13:33:29 -07:00
committed by GitHub
parent cedac5f4d4
commit 69f2a43063
13 changed files with 136 additions and 88 deletions

View File

@@ -11,7 +11,6 @@ import {
DataLinkBuiltInVars,
DataQuery,
DataTransformerConfig,
EventBus,
EventBusSrv,
FieldConfigSource,
PanelPlugin,
@@ -170,13 +169,18 @@ export class PanelModel implements DataConfigSource {
isInView = false;
configRev = 0; // increments when configs change
hasRefreshed?: boolean;
events: EventBus;
cacheTimeout?: any;
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.
* The EventBus passed to panels is based on the dashboard event model.
*/
events: EventBusSrv;
private queryRunner?: PanelQueryRunner;
constructor(model: any) {