Variables: replaces homegrown variableAdapters with Registry (#22866)

* Refactor: intial commit

* Tests: fixes tests

* Refactor: adds stricter typings
This commit is contained in:
Hugo Häggmark
2020-03-23 15:33:17 +01:00
committed by GitHub
parent 277edca3a0
commit cf5064bfa0
27 changed files with 281 additions and 478 deletions

View File

@@ -11,8 +11,9 @@ import { updateDataSourceVariableOptions } from './actions';
export const createDataSourceVariableAdapter = (): VariableAdapter<DataSourceVariableModel> => {
return {
id: 'datasource',
description: 'Enabled you to dynamically switch the datasource for multiple panels',
label: 'Datasource',
name: 'Datasource',
initialState: initialDataSourceVariableModelState,
reducer: dataSourceVariableReducer,
picker: OptionsPicker,