From af6893e41dc1a3e633ad30d2b6e4df9a9f6a0db7 Mon Sep 17 00:00:00 2001 From: Fabien Wernli Date: Thu, 28 Jan 2021 13:35:49 +0100 Subject: [PATCH] Fix documentation for streaming data sources (#30704) The added code is now mandatory since 7.4.x See https://github.com/grafana/grafana/issues/30686 --- .../plugins/build-a-streaming-data-source-plugin.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/sources/developers/plugins/build-a-streaming-data-source-plugin.md b/docs/sources/developers/plugins/build-a-streaming-data-source-plugin.md index ec9126d5555..c68e5dfdd76 100644 --- a/docs/sources/developers/plugins/build-a-streaming-data-source-plugin.md +++ b/docs/sources/developers/plugins/build-a-streaming-data-source-plugin.md @@ -75,6 +75,10 @@ Grafana uses [RxJS](https://rxjs.dev/) to continuously send data from a data sou 1. Use `subscriber.next()` to send the updated data frame whenever you receive new updates. + ```ts + import { LoadingState } from '@grafana/data'; + ``` + ```ts const intervalId = setInterval(() => { frame.add({ time: Date.now(), value: Math.random() }); @@ -82,6 +86,7 @@ Grafana uses [RxJS](https://rxjs.dev/) to continuously send data from a data sou subscriber.next({ data: [frame], key: query.refId, + state: LoadingState.Streaming, }); }, 500);