mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: better warning when plugins fail to load (#18671)
* better pluin feedback * add server side check for module.js
This commit is contained in:
committed by
Torkel Ödegaard
parent
c98c5c3c8e
commit
f7c55d3968
@@ -199,7 +199,7 @@ export function importAppPlugin(meta: PluginMeta): Promise<AppPlugin> {
|
||||
});
|
||||
}
|
||||
|
||||
import { getPanelPluginNotFound } from '../dashboard/dashgrid/PanelPluginNotFound';
|
||||
import { getPanelPluginNotFound, getPanelPluginLoadError } from '../dashboard/dashgrid/PanelPluginError';
|
||||
|
||||
interface PanelCache {
|
||||
[key: string]: PanelPlugin;
|
||||
@@ -233,7 +233,7 @@ export function importPanelPlugin(id: string): Promise<PanelPlugin> {
|
||||
})
|
||||
.catch(err => {
|
||||
// TODO, maybe a different error plugin
|
||||
console.log('Error loading panel plugin', err);
|
||||
return getPanelPluginNotFound(id);
|
||||
console.warn('Error loading panel plugin: ' + id, err);
|
||||
return getPanelPluginLoadError(meta, err);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user