From cc471f2d5846cb38489b1bfc77c4893bdd9a95dd Mon Sep 17 00:00:00 2001 From: Todd Treece <360020+toddtreece@users.noreply.github.com> Date: Fri, 19 Nov 2021 16:24:02 -0500 Subject: [PATCH] Recorded Queries: Split extension reducers init and extension init (#41850) --- public/app/app.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/public/app/app.ts b/public/app/app.ts index 721268ef29a..17ee23e94bd 100644 --- a/public/app/app.ts +++ b/public/app/app.ts @@ -95,9 +95,10 @@ export class GrafanaApp { setPanelRenderer(PanelRenderer); setLocationSrv(locationService); setTimeZoneResolver(() => config.bootData.user.timezone); - // Important that extensions are initialized before store - initExtensions(); + // Important that extension reducers are initialized before store + addExtensionReducers(); configureStore(); + initExtensions(); standardEditorsRegistry.setInit(getAllOptionEditors); standardFieldConfigEditorRegistry.setInit(getStandardFieldConfigs); @@ -145,6 +146,12 @@ export class GrafanaApp { } } +function addExtensionReducers() { + if (extensionsExports.length > 0) { + extensionsExports[0].addExtensionReducers(); + } +} + function initExtensions() { if (extensionsExports.length > 0) { extensionsExports[0].init();