(cherry picked from commit fbabed203f)
Co-authored-by: Guillermo Julián <gjulianm@users.noreply.github.com>
This commit is contained in:
co-authored by
Guillermo Julián
parent
d71e38eb96
commit
b692d2fd4c
@@ -23,6 +23,7 @@ import {
|
|||||||
locationUtil,
|
locationUtil,
|
||||||
getFieldDisplayName,
|
getFieldDisplayName,
|
||||||
getColorForTheme,
|
getColorForTheme,
|
||||||
|
InterpolateFunction,
|
||||||
} from '@grafana/data';
|
} from '@grafana/data';
|
||||||
|
|
||||||
import { convertOldAngularValueMapping } from '@grafana/ui';
|
import { convertOldAngularValueMapping } from '@grafana/ui';
|
||||||
@@ -621,7 +622,9 @@ class SingleStatCtrl extends MetricsPanelCtrl {
|
|||||||
elem.toggleClass('pointer', panel.links.length > 0);
|
elem.toggleClass('pointer', panel.links.length > 0);
|
||||||
|
|
||||||
if (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 {
|
} else {
|
||||||
linkInfo = null;
|
linkInfo = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user