SchemaV2: Fix saving of transparent setting of vizPanel (#104443)

* save transparent setting

* make sure we test both transparent and non transparent
This commit is contained in:
Oscar Kilhed
2025-04-24 14:13:18 +02:00
committed by GitHub
parent 1ffd64ff79
commit 8e6b8fad01
3 changed files with 2 additions and 1 deletions
@@ -71,6 +71,7 @@ exports[`transformSceneToSaveModelSchemaV2 should transform scene to save model
},
],
"title": "Test Panel",
"transparent": true,
"vizConfig": {
"kind": "timeseries",
"spec": {
@@ -268,7 +268,6 @@ describe('transformSceneToSaveModelSchemaV2', () => {
title: 'Test Panel 2',
description: 'Test Description 2',
fieldConfig: { defaults: {}, overrides: [] },
displayMode: 'transparent',
pluginVersion: '7.0.0',
$timeRange: new SceneTimeRange({
timeZone: 'UTC',
@@ -220,6 +220,7 @@ export function vizPanelToSchemaV2(
title: vizPanel.state.title,
description: vizPanel.state.description ?? '',
links: getPanelLinks(vizPanel),
transparent: vizPanel.state.displayMode === 'transparent' ? true : undefined,
data: {
kind: 'QueryGroup',
spec: {