Templating: removes old Angular variable system and featureToggle (#24779)

* Chore: initial commit

* Tests: fixes MetricsQueryEditor.test.tsx

* Tests: fixes cloudwatch/specs/datasource.test.ts

* Tests: fixes stackdriver/specs/datasource.test.ts

* Tests: remove refrences to CustomVariable

* Refactor: moves DefaultVariableQueryEditor

* Refactor: moves utils

* Refactor: moves types

* Refactor: removes variableSrv

* Refactor: removes feature toggle newVariables

* Refactor: removes valueSelectDropDown

* Chore: removes GeneralTabCtrl

* Chore: migrates RowOptions

* Refactor: adds RowOptionsButton

* Refactor: makes the interface more explicit

* Refactor: small changes

* Refactor: changed type as it can be any variable type

* Tests: fixes broken test

* Refactor: changes after PR comments

* Refactor: adds loading state and call to onChange in componentDidMount
This commit is contained in:
Hugo Häggmark
2020-06-04 13:44:48 +02:00
committed by GitHub
parent 6b4d1dceb0
commit 00a9af00fc
166 changed files with 678 additions and 5917 deletions

View File

@@ -1,4 +1,4 @@
import { VariableOption } from 'app/features/templating/types';
import { VariableOption } from 'app/features/variables/types';
import { alignCurrentWithMulti } from './multiOptions';
describe('alignCurrentWithMulti', () => {

View File

@@ -1,4 +1,4 @@
import { VariableOption } from 'app/features/templating/types';
import { VariableOption } from 'app/features/variables/types';
export const alignCurrentWithMulti = (current: VariableOption, value: boolean): VariableOption => {
if (!current) {

View File

@@ -1,4 +1,4 @@
import { AdHocVariableFilter, AdHocVariableModel } from 'app/features/templating/types';
import { AdHocVariableFilter, AdHocVariableModel } from 'app/features/variables/types';
import { VariableBuilder } from './variableBuilder';
export class AdHocVariableBuilder extends VariableBuilder<AdHocVariableModel> {

View File

@@ -1,5 +1,5 @@
import { MultiVariableBuilder } from './multiVariableBuilder';
import { DataSourceVariableModel, VariableRefresh } from 'app/features/templating/types';
import { DataSourceVariableModel, VariableRefresh } from 'app/features/variables/types';
export class DatasourceVariableBuilder<T extends DataSourceVariableModel> extends MultiVariableBuilder<T> {
withRefresh(refresh: VariableRefresh) {

View File

@@ -1,5 +1,5 @@
import { OptionsVariableBuilder } from './optionsVariableBuilder';
import { IntervalVariableModel, VariableRefresh } from 'app/features/templating/types';
import { IntervalVariableModel, VariableRefresh } from 'app/features/variables/types';
export class IntervalVariableBuilder extends OptionsVariableBuilder<IntervalVariableModel> {
withRefresh(refresh: VariableRefresh) {

View File

@@ -1,4 +1,4 @@
import { VariableWithMultiSupport } from 'app/features/templating/types';
import { VariableWithMultiSupport } from 'app/features/variables/types';
import { OptionsVariableBuilder } from './optionsVariableBuilder';
export class MultiVariableBuilder<T extends VariableWithMultiSupport> extends OptionsVariableBuilder<T> {

View File

@@ -1,4 +1,4 @@
import { VariableOption, VariableWithOptions } from 'app/features/templating/types';
import { VariableOption, VariableWithOptions } from 'app/features/variables/types';
import { VariableBuilder } from './variableBuilder';
export class OptionsVariableBuilder<T extends VariableWithOptions> extends VariableBuilder<T> {

View File

@@ -1,5 +1,5 @@
import cloneDeep from 'lodash/cloneDeep';
import { VariableModel } from 'app/features/templating/types';
import { VariableModel } from 'app/features/variables/types';
export class VariableBuilder<T extends VariableModel> {
protected variable: T;