mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(singletat): Support repeated template variables in prefix/postfix, fixes #6595
This commit is contained in:
parent
e6776f71d9
commit
4581bb4a7a
@ -6,6 +6,9 @@
|
||||
* **UI/Browser**: Fixed issue with page/view header gradient border not showing in Safari, [#6530](https://github.com/grafana/grafana/issues/6530)
|
||||
* **UX**: Panel Drop zone visible after duplicating panel, and when entering fullscreen/edit view, [#6598](https://github.com/grafana/grafana/issues/6598)
|
||||
|
||||
### Enhancements
|
||||
* **Singlestat**: Support repeated template variables in prefix/postfix [#6595](https://github.com/grafana/grafana/issues/6595)
|
||||
|
||||
# 4.0-beta1 (2016-11-09)
|
||||
|
||||
### Enhancements
|
||||
|
@ -64,6 +64,8 @@ export class DynamicDashboardSrv {
|
||||
j = j - 1;
|
||||
}
|
||||
}
|
||||
|
||||
row.panelSpanChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,11 +208,8 @@ class SingleStatCtrl extends MetricsPanelCtrl {
|
||||
}
|
||||
|
||||
// Add $__name variable for using in prefix or postfix
|
||||
data.scopedVars = {
|
||||
__name: {
|
||||
value: this.series[0].label
|
||||
}
|
||||
};
|
||||
data.scopedVars = _.extend({}, this.panel.scopedVars);
|
||||
data.scopedVars["__name"] = {value: this.series[0].label};
|
||||
}
|
||||
|
||||
// check value to text mappings if its enabled
|
||||
@ -526,7 +523,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
|
||||
elem.toggleClass('pointer', panel.links.length > 0);
|
||||
|
||||
if (panel.links.length > 0) {
|
||||
linkInfo = linkSrv.getPanelLinkAnchorInfo(panel.links[0], panel.scopedVars);
|
||||
linkInfo = linkSrv.getPanelLinkAnchorInfo(panel.links[0], data.scopedVars);
|
||||
} else {
|
||||
linkInfo = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user