mirror of https://github.com/grafana/grafana.git
Silcense warning message for row (#32985)
This commit is contained in:
parent
282c62d8bf
commit
4b801be98c
|
|
@ -51,14 +51,15 @@ export function getPanelPluginLoadError(meta: PanelPluginMeta, err: any): PanelP
|
|||
return plugin;
|
||||
}
|
||||
|
||||
export function getPanelPluginNotFound(id: string): PanelPlugin {
|
||||
export function getPanelPluginNotFound(id: string, silent?: boolean): PanelPlugin {
|
||||
const NotFound = class NotFound extends PureComponent<PanelProps> {
|
||||
render() {
|
||||
return <PanelPluginError title={`Panel plugin not found: ${id}`} />;
|
||||
}
|
||||
};
|
||||
|
||||
const plugin = new PanelPlugin(NotFound);
|
||||
const plugin = new PanelPlugin(silent ? () => null : NotFound);
|
||||
|
||||
plugin.meta = {
|
||||
id: id,
|
||||
name: id,
|
||||
|
|
|
|||
|
|
@ -134,10 +134,12 @@ export function initDashboardPanel(panel: PanelModel): ThunkResult<void> {
|
|||
plugin = await dispatch(loadPanelPlugin(pluginToLoad));
|
||||
} catch (e) {
|
||||
// When plugin not found
|
||||
plugin = getPanelPluginNotFound(pluginToLoad);
|
||||
plugin = getPanelPluginNotFound(pluginToLoad, pluginToLoad === 'row');
|
||||
if (pluginToLoad !== 'row') {
|
||||
notFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if there isn't an "external" plugin with the same name as deprecated one, load the deprecated panel replacement
|
||||
if (notFound && isDeprecated) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue