mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user