-
Notifications
You must be signed in to change notification settings - Fork 22
238 fix interpolation of multi variables #412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
238 fix interpolation of multi variables #412
Conversation
|
/build |
|
✅ Preview Build Completed!Version: 📦 Build Artifacts
|
Loori-R
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Left a couple of minor style suggestions.
Also, I might have missed it, but please double-check that quotes are properly escaped - for example, the value ["10.71.31.18"] should be inserted as "[\"10.71.31.18\"]".
dmitryk-dk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good! Remove console please
dmitryk-dk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
f6eddcd to
f4a6932
Compare
…ation and disallowed regexp variable interpolation
f4a6932 to
fdafddb
Compare
Related issue: #238
Interpolated:
• field:$var -> field:in("v1", ..., "vN")
• field:=$var -> field:in("v1", ..., "vN")
• Values are quoted and escaped via JSON.stringify()
• "All" values expand to in(*)
• in($var) and contains_any($var) expand to quoted lists
• Values maintain proper quoting within function calls
• field:!$var -> !field in("v1", ..., "vN")
• field:!=$var -> !field in("v1", ..., "vN")
• {tag=$var} -> {tag in(...)}
• {field!=$var} -> {tag not_in(...)}
• Interpolation is NOT allowed in regexp (e.g., field:~$var)
• Invalid usage will show an error message
Added these rules to the tooltip near the query input: