Build Grafana dashboards directly in your Grafana app plugins.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by grafanabot about 1 year ago
@grafana/scenes
@grafana/scenes
Published by grafanabot about 1 year ago
@grafana/scenes
@grafana/scenes
Published by grafanabot about 1 year ago
You can now automatically perform queries against a secondary time range to visualize time-over-time comparisons. Use SceneTimeRangeCompare
as in the example below:
const queryRunner = new SceneQueryRunner({
datasource: {
type: 'prometheus',
uid: 'gdev-prometheus',
},
queries: [
{
refId: 'A',
expr: 'rate(prometheus_http_requests_total{handler=~"/metrics"}[5m])',
},
],
});
const scene = new EmbeddedScene({
$data: queryRunner,
$timeRange: new SceneTimeRange({ from: 'now-5m', to: 'now' }),
controls: [
new SceneTimePicker({}),
new SceneTimeRangeCompare({}) // Use this object to enable time frame comparison UI
],
body: new SceneFlexLayout({
direction: 'row',
children: [
new SceneFlexItem({
width: '100%',
height: '100%',
body: PanelBuilders.timeseries().setTitle('Panel using global time range').build(),
}),
],
}),
});
@grafana/scenes
Published by grafanabot about 1 year ago
@grafana/scenes