Hi,
I want to use scopedVars when rendering a panel content. Where I can find them?
My panel extends MetricsPanelCtrl and receives templateSrv as a dependency on the constructor.
Thanks
Hi,
I want to use scopedVars when rendering a panel content. Where I can find them?
My panel extends MetricsPanelCtrl and receives templateSrv as a dependency on the constructor.
Thanks
Ok, found this at MetricsPanelCtrl code:
// make shallow copy of scoped vars,
// and add built in variables interval and interval_ms
const scopedVars = Object.assign({}, this.panel.scopedVars, {
__interval: { text: this.interval, value: this.interval },
__interval_ms: { text: this.intervalMs, value: this.intervalMs },
});
So this.panel.scopedVars seems to be the place.