From 0c64d88d64f9e6065f49157d73562e9d00fa11cd Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Mon, 19 Apr 2021 00:47:14 -0700 Subject: [PATCH] Live: support legacy stream paths (#33101) --- public/app/plugins/datasource/grafana/datasource.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/grafana/datasource.ts b/public/app/plugins/datasource/grafana/datasource.ts index 4cb75598f8b..8a871ec196f 100644 --- a/public/app/plugins/datasource/grafana/datasource.ts +++ b/public/app/plugins/datasource/grafana/datasource.ts @@ -30,7 +30,15 @@ export class GrafanaDatasource extends DataSourceApi { continue; } if (target.queryType === GrafanaQueryType.LiveMeasurements) { - const { channel, filter } = target; + let { channel, filter } = target; + + // Help migrate pre-release channel paths saved in dashboards + // NOTE: this should be removed before V8 is released + if (channel && channel.startsWith('telegraf/')) { + channel = 'stream/' + channel; + target.channel = channel; // mutate the current query object so it is saved with `stream/` prefix + } + const addr = parseLiveChannelAddress(channel); if (!isValidLiveChannelAddress(addr)) { continue;