mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 16:45:43 -06:00
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:
parent
29b3f3fbf4
commit
4c0571be3a
@ -10,6 +10,7 @@ import {
|
|||||||
DataSourceVariable,
|
DataSourceVariable,
|
||||||
TestVariable,
|
TestVariable,
|
||||||
NestedScene,
|
NestedScene,
|
||||||
|
TextBoxVariable,
|
||||||
} from '@grafana/scenes';
|
} from '@grafana/scenes';
|
||||||
|
|
||||||
import { DashboardScene } from '../dashboard/DashboardScene';
|
import { DashboardScene } from '../dashboard/DashboardScene';
|
||||||
@ -55,6 +56,10 @@ export function getVariablesDemo(): DashboardScene {
|
|||||||
name: 'ds',
|
name: 'ds',
|
||||||
query: 'testdata',
|
query: 'testdata',
|
||||||
}),
|
}),
|
||||||
|
new TextBoxVariable({
|
||||||
|
name: 'textbox',
|
||||||
|
value: 'default value',
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
body: new SceneFlexLayout({
|
body: new SceneFlexLayout({
|
||||||
@ -72,6 +77,11 @@ export function getVariablesDemo(): DashboardScene {
|
|||||||
alias: 'handler: $handler',
|
alias: 'handler: $handler',
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
new SceneCanvasText({
|
||||||
|
text: 'Text: ${textbox}',
|
||||||
|
fontSize: 20,
|
||||||
|
align: 'center',
|
||||||
|
}),
|
||||||
new SceneCanvasText({
|
new SceneCanvasText({
|
||||||
placement: { width: '40%' },
|
placement: { width: '40%' },
|
||||||
text: 'server: ${server} pod:${pod}',
|
text: 'server: ${server} pod:${pod}',
|
||||||
|
Loading…
Reference in New Issue
Block a user