Variables: Fixes Constant variable persistence confusion (#29407)

* Variables: Fixes savequery for Constant and TextBox variables

* Refactor: reverts textbox changes

* Refactor: Fixes dashboard export and tests

* Refactor: hides or migrates Constant variables

* Tests: fixes snapshots
This commit is contained in:
Hugo Häggmark
2020-12-01 15:02:49 +01:00
committed by GitHub
parent c52fd933f6
commit fb622650f3
13 changed files with 233 additions and 40 deletions

View File

@@ -182,16 +182,17 @@ export class DashboardExporter {
name: refName,
type: 'constant',
label: variable.label || variable.name,
value: variable.current.value,
value: variable.query,
description: '',
});
// update current and option
variable.query = '${' + refName + '}';
variable.options[0] = variable.current = {
variable.current = {
value: variable.query,
text: variable.query,
selected: false,
};
variable.options = [variable.current];
}
}