浏览代码

plugins: expose more util and flot dependencies

Also, fix for coremodules export. Have to add the __esModule
attribute to fool SystemJS.
Daniel Lee 8 年之前
父节点
当前提交
eb4e71e2c6
共有 1 个文件被更改,包括 14 次插入2 次删除
  1. 14 2
      public/app/features/plugins/plugin_loader.ts

+ 14 - 2
public/app/features/plugins/plugin_loader.ts

@@ -12,6 +12,9 @@ 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 * as fileExport from 'app/core/utils/file_export';
+import * as flatten from 'app/core/utils/flatten';
+import * as ticks from 'app/core/utils/ticks';
 import builtInPlugins from './buit_in_plugins';
 import d3 from 'vendor/d3/d3';
 
@@ -54,19 +57,24 @@ exposeToPlugin('rxjs/Observable', Observable);
 exposeToPlugin('d3', d3);
 
 exposeToPlugin('app/plugins/sdk', sdk);
+
 exposeToPlugin('app/core/utils/datemath', datemath);
+exposeToPlugin('app/core/utils/file_export', fileExport);
+exposeToPlugin('app/core/utils/flatten', flatten);
 exposeToPlugin('app/core/utils/kbn', kbn);
+exposeToPlugin('app/core/utils/ticks', ticks);
+
 exposeToPlugin('app/core/config', config);
 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,
+  __esModule: true
 });
 
 import 'vendor/flot/jquery.flot';
@@ -79,7 +87,11 @@ import 'vendor/flot/jquery.flot.fillbelow';
 import 'vendor/flot/jquery.flot.crosshair';
 import 'vendor/flot/jquery.flot.dashes';
 
-for (let flotDep of ['jquery.flot', 'jquery.flot.pie', 'jquery.flot.time']) {
+const flotDeps = [
+  'jquery.flot', 'jquery.flot.pie', 'jquery.flot.time', 'jquery.flot.fillbelow', 'jquery.flot.crosshair',
+  'jquery.flot.stack', 'jquery.flot.selection', 'jquery.flot.stackpercent', 'jquery.flot.events'
+];
+for (let flotDep of flotDeps) {
   exposeToPlugin(flotDep, {fakeDep: 1});
 }