mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AppPlugin: Fix load legacy plugin app (#17574)
* first init meta befor set legacy components * add load legacy app test * AppPlugin: minor refactor
This commit is contained in:
committed by
Torkel Ödegaard
parent
8ffef57178
commit
aa1f9cdd40
@@ -183,9 +183,9 @@ export function importDataSourcePlugin(meta: DataSourcePluginMeta): Promise<Data
|
||||
export function importAppPlugin(meta: PluginMeta): Promise<AppPlugin> {
|
||||
return importPluginModule(meta.module).then(pluginExports => {
|
||||
const plugin = pluginExports.plugin ? (pluginExports.plugin as AppPlugin) : new AppPlugin();
|
||||
plugin.setComponentsFromLegacyExports(pluginExports);
|
||||
plugin.init(meta);
|
||||
plugin.meta = meta;
|
||||
plugin.setComponentsFromLegacyExports(pluginExports);
|
||||
return plugin;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user