1
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

8 lines
414 B

import { StoreState } from 'app/types';
import { PanelPlugin } from '@grafana/data';
import { getPanelPluginNotFound } from '../../panel/components/PanelPluginError';
export const getPanelPluginWithFallback = (panelType: string) => (state: StoreState): PanelPlugin => {
const plugin = state.plugins.panels[panelType];
return plugin || getPanelPluginNotFound(`Panel plugin not found (${panelType})`, true);
};