mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Variables: breaks variable.ts into 2 separate files utils and types (#22884)
This commit is contained in:
@@ -4,7 +4,7 @@ import { FormLabel, Switch } from '@grafana/ui';
|
||||
|
||||
import templateSrv from '../../templating/template_srv';
|
||||
import { SelectionOptionsEditor } from '../editor/SelectionOptionsEditor';
|
||||
import { QueryVariableModel, VariableRefresh, VariableSort, VariableWithMultiSupport } from '../../templating/variable';
|
||||
import { QueryVariableModel, VariableRefresh, VariableSort, VariableWithMultiSupport } from '../../templating/types';
|
||||
import { QueryVariableEditorState } from './reducer';
|
||||
import { changeQueryVariableDataSource, changeQueryVariableQuery, initQueryVariableEditor } from './actions';
|
||||
import { VariableEditorState } from '../editor/reducer';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { variableAdapters } from '../adapters';
|
||||
import { createQueryVariableAdapter } from './adapter';
|
||||
import { reduxTester } from '../../../../test/core/redux/reduxTester';
|
||||
import { getTemplatingRootReducer } from '../state/helpers';
|
||||
import { QueryVariableModel, VariableHide, VariableRefresh, VariableSort } from '../../templating/variable';
|
||||
import { QueryVariableModel, VariableHide, VariableRefresh, VariableSort } from '../../templating/types';
|
||||
import { ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE, toVariablePayload } from '../state/types';
|
||||
import { changeVariableProp, setCurrentVariableValue } from '../state/sharedReducer';
|
||||
import { initDashboardTemplating } from '../state/actions';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { AppEvents, DataSourcePluginMeta, DataSourceSelectItem } from '@grafana/data';
|
||||
|
||||
import { validateVariableSelectionState } from '../state/actions';
|
||||
import { QueryVariableModel, VariableRefresh } from '../../templating/variable';
|
||||
import { QueryVariableModel, VariableRefresh } from '../../templating/types';
|
||||
import { ThunkResult } from '../../../types';
|
||||
import { getDatasourceSrv } from '../../plugins/datasource_srv';
|
||||
import { getTimeSrv } from '../../dashboard/services/TimeSrv';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
|
||||
import { containsVariable, QueryVariableModel, VariableRefresh } from '../../templating/variable';
|
||||
import { QueryVariableModel, VariableRefresh } from '../../templating/types';
|
||||
import { initialQueryVariableModelState, queryVariableReducer } from './reducer';
|
||||
import { dispatch } from '../../../store/store';
|
||||
import { setOptionAsCurrent, setOptionFromUrl } from '../state/actions';
|
||||
@@ -9,6 +9,7 @@ import { OptionsPicker } from '../pickers';
|
||||
import { QueryVariableEditor } from './QueryVariableEditor';
|
||||
import { updateQueryVariableOptions } from './actions';
|
||||
import { ALL_VARIABLE_TEXT, toVariableIdentifier } from '../state/types';
|
||||
import { containsVariable } from '../../templating/utils';
|
||||
|
||||
export const createQueryVariableAdapter = (): VariableAdapter<QueryVariableModel> => {
|
||||
return {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { reducerTester } from '../../../../test/core/redux/reducerTester';
|
||||
import { queryVariableReducer, updateVariableOptions, updateVariableTags } from './reducer';
|
||||
import { QueryVariableModel, VariableOption } from '../../templating/variable';
|
||||
import { QueryVariableModel, VariableOption } from '../../templating/types';
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
import { VariablesState } from '../state/variablesReducer';
|
||||
import { getVariableTestContext } from '../state/helpers';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
VariableRefresh,
|
||||
VariableSort,
|
||||
VariableTag,
|
||||
} from '../../templating/variable';
|
||||
} from '../../templating/types';
|
||||
import templateSrv from '../../templating/template_srv';
|
||||
import {
|
||||
ALL_VARIABLE_TEXT,
|
||||
|
||||
Reference in New Issue
Block a user