mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AppPlugins: fix app support and add an alpha example (#16528)
* app pages * app pages * workign example * started alpha support * bump controller limit * bump controller limit * existing plugin pages work again * save Plugin in cache * remove AppPage wip
This commit is contained in:
committed by
Torkel Ödegaard
parent
5f1b2691a3
commit
5a0cf1a83c
@@ -18,7 +18,7 @@ import config from 'app/core/config';
|
||||
import TimeSeries from 'app/core/time_series2';
|
||||
import TableModel from 'app/core/table_model';
|
||||
import { coreModule, appEvents, contextSrv } from 'app/core/core';
|
||||
import { DataSourcePlugin, AppPlugin, ReactPanelPlugin, AngularPanelPlugin } from '@grafana/ui/src/types';
|
||||
import { DataSourcePlugin, AppPlugin, ReactPanelPlugin, AngularPanelPlugin, PluginMeta } from '@grafana/ui/src/types';
|
||||
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';
|
||||
@@ -176,9 +176,9 @@ export function importDataSourcePlugin(path: string): Promise<DataSourcePlugin>
|
||||
});
|
||||
}
|
||||
|
||||
export function importAppPlugin(path: string): Promise<AppPlugin> {
|
||||
return importPluginModule(path).then(pluginExports => {
|
||||
return new AppPlugin(pluginExports.ConfigCtrl);
|
||||
export function importAppPlugin(meta: PluginMeta): Promise<AppPlugin> {
|
||||
return importPluginModule(meta.module).then(pluginExports => {
|
||||
return new AppPlugin(meta, pluginExports);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user