From ae2556b20489f49f6033b4e14e6bc56f3b79a612 Mon Sep 17 00:00:00 2001 From: Mohamad Fadhil Date: Mon, 26 May 2025 16:03:52 +0800 Subject: [PATCH] Fix: typo in doc (#105981) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Irene Rodríguez --- .../observability-as-code/foundation-sdk/_index.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/sources/observability-as-code/foundation-sdk/_index.md b/docs/sources/observability-as-code/foundation-sdk/_index.md index d6c52748f2e..a6fad7139fe 100644 --- a/docs/sources/observability-as-code/foundation-sdk/_index.md +++ b/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)); ```