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;
 | 
					  return plugin;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function getPanelPluginNotFound(id: string): PanelPlugin {
 | 
					export function getPanelPluginNotFound(id: string, silent?: boolean): PanelPlugin {
 | 
				
			||||||
  const NotFound = class NotFound extends PureComponent<PanelProps> {
 | 
					  const NotFound = class NotFound extends PureComponent<PanelProps> {
 | 
				
			||||||
    render() {
 | 
					    render() {
 | 
				
			||||||
      return <PanelPluginError title={`Panel plugin not found: ${id}`} />;
 | 
					      return <PanelPluginError title={`Panel plugin not found: ${id}`} />;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const plugin = new PanelPlugin(NotFound);
 | 
					  const plugin = new PanelPlugin(silent ? () => null : NotFound);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  plugin.meta = {
 | 
					  plugin.meta = {
 | 
				
			||||||
    id: id,
 | 
					    id: id,
 | 
				
			||||||
    name: id,
 | 
					    name: id,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -134,8 +134,10 @@ export function initDashboardPanel(panel: PanelModel): ThunkResult<void> {
 | 
				
			||||||
        plugin = await dispatch(loadPanelPlugin(pluginToLoad));
 | 
					        plugin = await dispatch(loadPanelPlugin(pluginToLoad));
 | 
				
			||||||
      } catch (e) {
 | 
					      } catch (e) {
 | 
				
			||||||
        // When plugin not found
 | 
					        // When plugin not found
 | 
				
			||||||
        plugin = getPanelPluginNotFound(pluginToLoad);
 | 
					        plugin = getPanelPluginNotFound(pluginToLoad, pluginToLoad === 'row');
 | 
				
			||||||
        notFound = true;
 | 
					        if (pluginToLoad !== 'row') {
 | 
				
			||||||
 | 
					          notFound = true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue