selectors.ts 425 B

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