mirror of
https://github.com/grafana/grafana.git
synced 2025-09-28 04:43:50 +08:00

* Refactor: moves all the newVariables part to features/variables directory * Feature: adds datasource type * Tests: adds reducer tests * Tests: covers data source actions with tests * Chore: reduces strict null errors
12 lines
521 B
TypeScript
12 lines
521 B
TypeScript
import { validateVariableSelectionState } from '../state/actions';
|
|
import { ThunkResult } from 'app/types';
|
|
import { createCustomOptionsFromQuery } from './reducer';
|
|
import { toVariablePayload, VariableIdentifier } from '../state/types';
|
|
|
|
export const updateCustomVariableOptions = (identifier: VariableIdentifier): ThunkResult<void> => {
|
|
return async dispatch => {
|
|
await dispatch(createCustomOptionsFromQuery(toVariablePayload(identifier)));
|
|
await dispatch(validateVariableSelectionState(identifier));
|
|
};
|
|
};
|