getTemplateSrvDependencies.ts 528 B

12345678910
  1. import { TemplateSrvDependencies } from 'app/features/templating/template_srv';
  2. import { getFilteredVariables, getVariables, getVariableWithName } from '../../app/features/variables/state/selectors';
  3. import { StoreState } from '../../app/types';
  4. export const getTemplateSrvDependencies = (state: StoreState): TemplateSrvDependencies => ({
  5. getFilteredVariables: (filter) => getFilteredVariables(filter, state),
  6. getVariableWithName: (name) => getVariableWithName(name, state),
  7. getVariables: () => getVariables(state),
  8. });