grafana/public/app/features/variables
Josh Hunt 1c6eca09bb
Variables: Explicitly type variable editor extended state (#44749)
* Narrow Variable editor state using selector functions

 - Explicitly type "extended" editor state in editor/reducter.ts using a union
 - Create selectors to narrow the types, using unique properties from each extended state to discriminate the union
 - Update DataSourceVariableEditor to use new style of redux connector
 - Update variable editor components to use new selectors

* fix tests

* Make adhoc variable infoText optional, because it is!

* Add AdHocVariableEditor tests

* DataSourceVariableEditor tests

* comment

* reset

* Wrote tests for selectors \(that actually caught a bug, whodathunkit)

* fix stray types and lint issues

* Rename selector functions
2022-02-08 09:31:42 +11:00
..
adhoc Variables: Explicitly type variable editor extended state (#44749) 2022-02-08 09:31:42 +11:00
constant Chore: Move variable field selectors to data-testid (#44801) 2022-02-04 11:55:19 +11:00
custom Chore: E2E tests for various variables types (#44747) 2022-02-03 09:58:56 +11:00
datasource Variables: Explicitly type variable editor extended state (#44749) 2022-02-08 09:31:42 +11:00
editor Variables: Explicitly type variable editor extended state (#44749) 2022-02-08 09:31:42 +11:00
inspect Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
interval Chore: More variable e2e tests (#44803) 2022-02-04 12:37:01 +11:00
pickers Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
query Variables: Explicitly type variable editor extended state (#44749) 2022-02-08 09:31:42 +11:00
shared Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
state Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
system Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
textbox Chore: Move variable field selectors to data-testid (#44801) 2022-02-04 11:55:19 +11:00
adapters.ts Chore: reduces circular dependencies for variables/utils.ts (#44087) 2022-01-17 12:48:26 +01:00
constants.ts Chore: reduces circular dependencies for variables/utils.ts (#44087) 2022-01-17 12:48:26 +01:00
getAllVariableValuesForUrl.test.ts TimeSrv: Refactor service to have no dependency on angular (#32562) 2021-04-01 06:33:11 +02:00
getAllVariableValuesForUrl.ts TimeSrv: Refactor service to have no dependency on angular (#32562) 2021-04-01 06:33:11 +02:00
guard.test.ts Variables: Adds new Api that allows proper QueryEditors for Query variables (#28217) 2020-11-18 15:10:32 +01:00
guard.ts Chore: reduces circular dependencies for variables/utils.ts (#44087) 2022-01-17 12:48:26 +01:00
types.ts Update dependency prettier to v2.5.1 (#43473) 2022-02-02 12:02:32 +00:00
utils.test.ts Variables: Fix issue with empty dropdowns on navigation (#37776) 2021-08-13 09:10:37 +02:00
utils.ts Chore: reduces circular dependencies for variables/utils.ts (#44087) 2022-01-17 12:48:26 +01:00