You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
I find the 3.0.1 version not working when there is an variable in Grafana template when using metrics() as query. It reports "Template variables could not be initialized: Cannot read property 'regexp' of undefined" if I use metrics() and reports "Template variables could not be initialized: Cannot read property 'then' of undefined" if I use metrics(myprefix).
After debugging with Chrome, I find MetricNamesStore.initialize():Promise<string[]> is never called in page load, and when calling get(): Promise<string[]>, the initialized property is false and fetchingPromise is undefined. After an explicit calling initialize(), using metrics(myprefix) is recovered. But metrics() still no luck.
This is my fixed get():
public get(): Promise<string[]> {
if (this.initialized) {
return this.promiseUtils.resolvedPromise(this.metricNames);
} else {
return this.initialize();
}
}
The text was updated successfully, but these errors were encountered:
I find the 3.0.1 version not working when there is an variable in Grafana template when using metrics() as query. It reports "Template variables could not be initialized: Cannot read property 'regexp' of undefined" if I use metrics() and reports "Template variables could not be initialized: Cannot read property 'then' of undefined" if I use metrics(myprefix).
After debugging with Chrome, I find MetricNamesStore.initialize():Promise<string[]> is never called in page load, and when calling get(): Promise<string[]>, the initialized property is false and fetchingPromise is undefined. After an explicit calling initialize(), using metrics(myprefix) is recovered. But metrics() still no luck.
This is my fixed get():
The text was updated successfully, but these errors were encountered: