DashboardScene: Do not hide variables on save (#81501)

This commit is contained in:
Dominik Prokop 2024-01-30 01:28:17 -08:00 committed by GitHub
parent f77c831e3f
commit 9982830bd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 6 deletions

View File

@ -494,7 +494,6 @@ exports[`transformSceneToSaveModel Given a simple scene with custom settings Sho
"text": "1m",
"value": "1m",
},
"hide": 2,
"name": "intervalVar",
"query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
"refresh": 2,
@ -812,7 +811,6 @@ exports[`transformSceneToSaveModel Given a simple scene with variables Should tr
"text": "1m",
"value": "1m",
},
"hide": 2,
"name": "intervalVar",
"query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
"refresh": 2,

View File

@ -336,7 +336,6 @@ describe('sceneVariablesSetToVariables', () => {
"value": "text value",
},
"description": "test-desc",
"hide": 2,
"label": "test-label",
"name": "test",
"query": "text value",

View File

@ -34,7 +34,6 @@ export function sceneVariablesSetToVariables(set: SceneVariables) {
includeAll: variable.state.includeAll,
multi: variable.state.isMulti,
skipUrlSync: variable.state.skipUrlSync,
hide: variable.state.hide || VariableHide.dontHide,
});
} else if (sceneUtils.isCustomVariable(variable)) {
variables.push({
@ -90,7 +89,6 @@ export function sceneVariablesSetToVariables(set: SceneVariables) {
value: variable.state.value,
},
query: intervals,
hide: VariableHide.hideVariable,
refresh: variable.state.refresh,
// @ts-expect-error ?? how to fix this without adding the ts-expect-error
auto: variable.state.autoEnabled,
@ -105,7 +103,6 @@ export function sceneVariablesSetToVariables(set: SceneVariables) {
value: variable.state.value,
},
query: variable.state.value,
hide: VariableHide.hideVariable,
});
} else {
throw new Error('Unsupported variable type');