Open adam-j-turner opened 4 years ago
+1
This bug is related to the following line of code, which is repeated for all panel types:
targets+: [target { refId: std.char(std.codepoint('A') + nextTarget) }],
Once the list of targets exceeds 26 the refId
no longer validates against ^[a-z][a-zA-Z0-9_]*$
, which results in the following exception:
"ValidationError: The value query<char> for parameter MetricDataQueries.member.5.Id is not matching the expected pattern ^[a-z][a-zA-Z0-9_]*$.
The value query<char> for parameter MetricDataQueries.member.6.Id is not matching the expected pattern ^[a-z][a-zA-Z0-9_]*$.
My quick 'n dirty patch goes something like this:
// targets
- _nextTarget:: 0,
+ _nextTarget:: 1,
addTarget(target):: self {
local nextTarget = super._nextTarget,
_nextTarget: nextTarget + 1,
- targets+: [target { refId: std.char(std.codepoint('A') + nextTarget) }],
+ targets+: [target { refId: 'query_' + nextTarget }],
},
addTargets(targets):: std.foldl(function(p, t) p.addTarget(t), targets, self),
The first target refId generated by tablePanel is 'A' but the rest are unexpected unicode characters.
Example jsonnet -
Output -