grafana-flowcharting
grafana-flowcharting copied to clipboard
Javascript error in the console related to metric regex
Hello,
I was reworking a big panel which had 48 requests to Azure log analytics and causing us to hit the rate limit. I went back to one single query with all the data, and started updating the rules. The metric autocompletion works, and I can see the 48 differents metrics, and so choose the one I need.
After that when refreshing the dashboard I can see the following error in the js console :
module.js:2 Uncaught (in promise) TypeError: Cannot read property '1' of null
Related code :
stringToJsRegex: function(t) {
if ("/" !== t[0])
return new RegExp("^".concat(t, "$"));
var e = t.match(new RegExp("^/(.*?)/(g?i?m?y?)$"));
return new RegExp(e[1],e[2])
},
Error is on the return line.
What can I do to help you see what's the issue ?
Hi @morsok Can u try todisable regex options if u don't use regex ?
BR
Hello,
Sorry for the late answer, I'm not sure I can deactivate the regex on this case, I'm speaking of the Apply to metrics field. I start typing, it correctly autocompletes with the list of 48 metrics, I choose the one I want (I disabled the 47 other rules so there's just this one active), and then I get the error and the graph does not refresh.
Would you need more screenshots / debugging steps / tests?
Hello, Do you have some news about this pb ? Best regards,
Charles
Cant reproduce, can you give me your regex ?