Fix: typo in doc (#105981)

Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
pull/106000/head
Mohamad Fadhil 8 months ago committed by GitHub
parent 1e383b0c1e
commit ae2556b204
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      docs/sources/observability-as-code/foundation-sdk/_index.md

@ -68,7 +68,7 @@ For other languages, refer to the Grafana Foundation SDK documentation for detai
The following example demonstrates how you can create a simple dashboard using TypeScript:
```bash
```typescript
import { DashboardBuilder, RowBuilder } from '@grafana/grafana-foundation-sdk/dashboard';
import { DataqueryBuilder } from '@grafana/grafana-foundation-sdk/prometheus';
import { PanelBuilder } from '@grafana/grafana-foundation-sdk/timeseries';
@ -76,7 +76,7 @@ const builder = new DashboardBuilder('Sample Dashboard')
.uid('sample-dashboard')
.tags(['example', 'typescript'])
.refresh('1m')
.time({from: 'now-30m', to: 'now'})
.time({ from: 'now-30m', to: 'now' })
.timezone('browser')
.withRow(new RowBuilder('Overview'))
.withPanel(
@ -87,10 +87,9 @@ const builder = new DashboardBuilder('Sample Dashboard')
.withTarget(
new DataqueryBuilder()
.expr('rate(node_network_receive_bytes_total{job="example-job", device!="lo"}[$__rate_interval]) * 8')
.legendFormat("{{ device }}")
.legendFormat('{{ device }}')
)
)
;
);
console.log(JSON.stringify(builder.build(), null, 2));
```

Loading…
Cancel
Save