mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
Fix: Angular detection in plugin loader (#87323)
fix(plugins): make sure angular detection is passed to loader
This commit is contained in:
parent
a6076d8d05
commit
f785a71aae
@ -90,6 +90,7 @@ export interface PluginMeta<T extends KeyValue = {}> {
|
||||
signatureOrg?: string;
|
||||
live?: boolean;
|
||||
angular?: AngularMeta;
|
||||
angularDetected?: boolean;
|
||||
}
|
||||
|
||||
interface PluginDependencyInfo {
|
||||
|
@ -98,10 +98,11 @@ export async function importPluginModule({
|
||||
}
|
||||
|
||||
export function importDataSourcePlugin(meta: DataSourcePluginMeta): Promise<GenericDataSourcePlugin> {
|
||||
const isAngular = meta.angular?.detected ?? meta.angularDetected;
|
||||
return importPluginModule({
|
||||
path: meta.module,
|
||||
version: meta.info?.version,
|
||||
isAngular: meta.angular?.detected,
|
||||
isAngular,
|
||||
pluginId: meta.id,
|
||||
}).then((pluginExports) => {
|
||||
if (pluginExports.plugin) {
|
||||
@ -126,10 +127,11 @@ export function importDataSourcePlugin(meta: DataSourcePluginMeta): Promise<Gene
|
||||
}
|
||||
|
||||
export function importAppPlugin(meta: PluginMeta): Promise<AppPlugin> {
|
||||
const isAngular = meta.angular?.detected ?? meta.angularDetected;
|
||||
return importPluginModule({
|
||||
path: meta.module,
|
||||
version: meta.info?.version,
|
||||
isAngular: meta.angular?.detected,
|
||||
isAngular,
|
||||
pluginId: meta.id,
|
||||
}).then((pluginExports) => {
|
||||
const plugin: AppPlugin = pluginExports.plugin ? pluginExports.plugin : new AppPlugin();
|
||||
|
Loading…
Reference in New Issue
Block a user