From 69ee917c8924915cc394ee64705185367079f9f0 Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Mon, 2 May 2022 11:42:20 +0200 Subject: [PATCH] SSE: Add constant for data source name (#48443) * add property for expressions datasource name * remove console log --- packages/grafana-runtime/src/utils/DataSourceWithBackend.ts | 1 + public/app/features/expressions/ExpressionDatasource.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/grafana-runtime/src/utils/DataSourceWithBackend.ts b/packages/grafana-runtime/src/utils/DataSourceWithBackend.ts index f79f76eaddb..5bbc93b4a84 100644 --- a/packages/grafana-runtime/src/utils/DataSourceWithBackend.ts +++ b/packages/grafana-runtime/src/utils/DataSourceWithBackend.ts @@ -34,6 +34,7 @@ import { BackendDataSourceResponse, toDataQueryResponse } from './queryResponse' export const ExpressionDatasourceRef = Object.freeze({ type: '__expr__', uid: '__expr__', + name: 'Expression', }); /** diff --git a/public/app/features/expressions/ExpressionDatasource.ts b/public/app/features/expressions/ExpressionDatasource.ts index cb9d4f16be6..096d8a988dc 100644 --- a/public/app/features/expressions/ExpressionDatasource.ts +++ b/public/app/features/expressions/ExpressionDatasource.ts @@ -69,7 +69,7 @@ export const ExpressionDatasourceUID = '-100'; export const instanceSettings: DataSourceInstanceSettings = { id: -100, uid: ExpressionDatasourceUID, - name: ExpressionDatasourceRef.type, + name: ExpressionDatasourceRef.name, type: ExpressionDatasourceRef.type, access: 'proxy', meta: {