Skip to content

Commit

Permalink
SingleStat: fix wrong call to getDataLinkUIModel (#32721) (#32739)
Browse files Browse the repository at this point in the history
(cherry picked from commit fbabed2)

Co-authored-by: Guillermo Julián <gjulianm@users.noreply.github.com>
  • Loading branch information
grafanabot and gjulianm committed Apr 7, 2021
1 parent d71e38e commit b692d2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion public/app/plugins/panel/singlestat/module.ts
Expand Up @@ -23,6 +23,7 @@ import {
locationUtil,
getFieldDisplayName,
getColorForTheme,
InterpolateFunction,
} from '@grafana/data';

import { convertOldAngularValueMapping } from '@grafana/ui';
Expand Down Expand Up @@ -621,7 +622,9 @@ class SingleStatCtrl extends MetricsPanelCtrl {
elem.toggleClass('pointer', panel.links.length > 0);

if (panel.links.length > 0) {
linkInfo = linkSrv.getDataLinkUIModel(panel.links[0], data.scopedVars, {});
const replace: InterpolateFunction = (value, vars) =>
templateSrv.replace(value, { ...vars, ...data.scopedVars });
linkInfo = linkSrv.getDataLinkUIModel(panel.links[0], replace, {});
} else {
linkInfo = null;
}
Expand Down

0 comments on commit b692d2f

Please sign in to comment.