From 58badd70b0fcbed34d2219129e665af12e2a998a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Mon, 7 Oct 2019 23:32:39 -0700 Subject: [PATCH] SingleStat: Fixes $__name postfix/prefix usage (#19687) Fixes #19567 --- public/app/plugins/panel/singlestat/module.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/public/app/plugins/panel/singlestat/module.ts b/public/app/plugins/panel/singlestat/module.ts index ca9c17f9717..62f6ef17ee9 100644 --- a/public/app/plugins/panel/singlestat/module.ts +++ b/public/app/plugins/panel/singlestat/module.ts @@ -4,11 +4,11 @@ import 'vendor/flot/jquery.flot'; import 'vendor/flot/jquery.flot.gauge'; import 'app/features/panel/panellinks/link_srv'; import { - LegacyResponseData, - getFlotPairs, - getDisplayProcessor, convertOldAngulrValueMapping, getColorFromHexRgbOrName, + getDisplayProcessor, + getFlotPairs, + LegacyResponseData, } from '@grafana/ui'; import kbn from 'app/core/utils/kbn'; @@ -16,15 +16,15 @@ import config from 'app/core/config'; import { MetricsPanelCtrl } from 'app/plugins/sdk'; import { DataFrame, - FieldType, - reduceField, - ReducerID, - Field, - GraphSeriesValue, DisplayValue, + Field, fieldReducers, + FieldType, + GraphSeriesValue, KeyValue, LinkModel, + reduceField, + ReducerID, } from '@grafana/data'; import { auto } from 'angular'; import { LinkSrv } from 'app/features/panel/panellinks/link_srv'; @@ -257,7 +257,7 @@ class SingleStatCtrl extends MetricsPanelCtrl { sparkline, }; - data.scopedVars['__name'] = name; + data.scopedVars['__name'] = { value: name }; panel.tableColumn = this.fieldNames.length > 1 ? name : ''; // Get the fields for a sparkline