TemplateVariables: make sure we handle multi/single value with correct data type (#23208)

* Fixed issue with multi value.

* Made some refactorings after feedback from Torkel and Hugo.

* minor refactorings.

* changed so we don't make the current value to array if multi is false.

* added snapshot to contain v23.

* Fixed so we always use the correct type when setting value for multi/non-multi.

* added some more tests.

* added tests.

* some small adjustments after feedback
This commit is contained in:
Marcus Andersson
2020-04-01 18:13:38 +02:00
committed by GitHub
parent 6402dde646
commit ac7af7d4c3
16 changed files with 379 additions and 48 deletions

View File

@@ -241,7 +241,7 @@ exports[`DashboardGrid Can render dashboard grid Should render 1`] = `
],
"refresh": undefined,
"revision": undefined,
"schemaVersion": 22,
"schemaVersion": 23,
"snapshot": undefined,
"style": "dark",
"tags": Array [],
@@ -489,7 +489,7 @@ exports[`DashboardGrid Can render dashboard grid Should render 1`] = `
],
"refresh": undefined,
"revision": undefined,
"schemaVersion": 22,
"schemaVersion": 23,
"snapshot": undefined,
"style": "dark",
"tags": Array [],
@@ -737,7 +737,7 @@ exports[`DashboardGrid Can render dashboard grid Should render 1`] = `
],
"refresh": undefined,
"revision": undefined,
"schemaVersion": 22,
"schemaVersion": 23,
"snapshot": undefined,
"style": "dark",
"tags": Array [],
@@ -985,7 +985,7 @@ exports[`DashboardGrid Can render dashboard grid Should render 1`] = `
],
"refresh": undefined,
"revision": undefined,
"schemaVersion": 22,
"schemaVersion": 23,
"snapshot": undefined,
"style": "dark",
"tags": Array [],