Scenes: Add textbox var to scenes demo (#64313)

* Scenes: Add textbox var to scenes demo

* Upgrade scenes version

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
This commit is contained in:
kay delaney 2023-03-09 14:09:15 +00:00 committed by GitHub
parent 29b3f3fbf4
commit 4c0571be3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import {
DataSourceVariable,
TestVariable,
NestedScene,
TextBoxVariable,
} from '@grafana/scenes';
import { DashboardScene } from '../dashboard/DashboardScene';
@ -55,6 +56,10 @@ export function getVariablesDemo(): DashboardScene {
name: 'ds',
query: 'testdata',
}),
new TextBoxVariable({
name: 'textbox',
value: 'default value',
}),
],
}),
body: new SceneFlexLayout({
@ -72,6 +77,11 @@ export function getVariablesDemo(): DashboardScene {
alias: 'handler: $handler',
}),
}),
new SceneCanvasText({
text: 'Text: ${textbox}',
fontSize: 20,
align: 'center',
}),
new SceneCanvasText({
placement: { width: '40%' },
text: 'server: ${server} pod:${pod}',