mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06: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
527 B
TypeScript
12 lines
527 B
TypeScript
import { validateVariableSelectionState } from '../state/actions';
|
|
import { ThunkResult } from 'app/types';
|
|
import { createConstantOptionsFromQuery } from './reducer';
|
|
import { toVariablePayload, VariableIdentifier } from '../state/types';
|
|
|
|
export const updateConstantVariableOptions = (identifier: VariableIdentifier): ThunkResult<void> => {
|
|
return async dispatch => {
|
|
await dispatch(createConstantOptionsFromQuery(toVariablePayload(identifier)));
|
|
await dispatch(validateVariableSelectionState(identifier));
|
|
};
|
|
};
|