From 630e6f5da6c34bae1242f7fd8994f7800671e8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 10 Oct 2017 15:06:54 +0200 Subject: [PATCH] tech: expose more to plugins, closes #9456 --- public/app/features/plugins/plugin_loader.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public/app/features/plugins/plugin_loader.ts b/public/app/features/plugins/plugin_loader.ts index 89df75dc78e..dc766dd7617 100644 --- a/public/app/features/plugins/plugin_loader.ts +++ b/public/app/features/plugins/plugin_loader.ts @@ -8,11 +8,12 @@ import jquery from 'jquery'; import config from 'app/core/config'; import TimeSeries from 'app/core/time_series2'; import TableModel from 'app/core/table_model'; -import appEvents from 'app/core/app_events'; +import {coreModule, appEvents, contextSrv} from 'app/core/core'; import {Observable} from 'rxjs/Observable'; import {Subject} from 'rxjs/Subject'; import * as datemath from 'app/core/utils/datemath'; import builtInPlugins from './buit_in_plugins'; +import d3 from 'vendor/d3/d3'; System.config({ baseURL: 'public', @@ -50,6 +51,7 @@ exposeToPlugin('jquery', jquery); exposeToPlugin('angular', angular); exposeToPlugin('rxjs/Subject', Subject); exposeToPlugin('rxjs/Observable', Observable); +exposeToPlugin('d3', d3); exposeToPlugin('app/plugins/sdk', sdk); exposeToPlugin('app/core/utils/datemath', datemath); @@ -59,6 +61,13 @@ exposeToPlugin('app/core/time_series', TimeSeries); exposeToPlugin('app/core/time_series2', TimeSeries); exposeToPlugin('app/core/table_model', TableModel); exposeToPlugin('app/core/app_events', appEvents); +exposeToPlugin('app/core/core_module', coreModule); +exposeToPlugin('app/core/core_module', coreModule); +exposeToPlugin('app/core/core', { + coreModule: coreModule, + appEvents: appEvents, + contextSrv: contextSrv, +}); import 'vendor/flot/jquery.flot'; import 'vendor/flot/jquery.flot.selection';