-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fields: Regex - custom multi-select levels variable #1030
Conversation
…ator-ui__variable-ui' into gtk-grafana/issues/1009/regex-fields-from-explore__operator-ui__variable-ui__levels-tweaks
There is certainly more to follow up on here, but I'll argue as of this this PR we have a minimally shippable feature. |
…ator-ui__variable-ui' into gtk-grafana/issues/1009/regex-fields-from-explore__operator-ui__variable-ui__levels-tweaks
…ator-ui__variable-ui' into gtk-grafana/issues/1009/regex-fields-from-explore__operator-ui__variable-ui__levels-tweaks
…ator-ui__variable-ui' into gtk-grafana/issues/1009/regex-fields-from-explore__operator-ui__variable-ui__levels-tweaks
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.
Works very well! Left a few minor comments and suggestions.
}); | ||
}; | ||
|
||
updateFilters = (skipPublish: boolean, forcePublish?: boolean) => { |
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.
updateFilters = (skipPublish: boolean, forcePublish?: boolean) => { | |
updateFilters = (skipPublish: boolean, forcePublish = false) => { |
if (filters.length) { | ||
return `| ${LEVEL_VARIABLE_VALUE}=~\`${filters.map((f) => f.value).join('|')}\``; | ||
} | ||
return ''; |
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.
Maybe:
if (filters.length) { | |
return `| ${LEVEL_VARIABLE_VALUE}=~\`${filters.map((f) => f.value).join('|')}\``; | |
} | |
return ''; | |
if (filters.length > 1) { | |
return `| ${LEVEL_VARIABLE_VALUE}=~\`${filters.map((f) => f.value).join('|')}\``; | |
} else if (filters.length === 1) { | |
return `| ${LEVEL_VARIABLE_VALUE}=\`${filters[0].value}\``; | |
} | |
return ''; |
Co-authored-by: Matias Chomicki <[email protected]>
Co-authored-by: Matias Chomicki <[email protected]>
Co-authored-by: Matias Chomicki <[email protected]>
dae9757
into
gtk-grafana/issues/1009/regex-fields-from-explore__operator-ui__variable-ui
* Fields: Regex - Supporting regex fields from Explore (#1023) * Fields: Regex - Operator UI updates and double-quotes (#1028) * Fields: Regex - Combining metadata and fields (#1029) * Fields: Regex - custom multi-select levels variable (#1030) --------- Co-authored-by: Matias Chomicki <[email protected]>
Parent branch: #1029
This PR adds a custom renderer for the levels field to more prominently surface detected_level filters.