-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AO] Compile the KQL expression on the server (#162701)
Closes #159017 ## Summary This PR is related to this [comment](#158665 (comment)). Previously, we had both `fitlerQueryText` (unparsed KQL expression) and `filterQuery` (stringified JSON representation of the KQL expression). This makes the JSON body for creating a rule via the API confusing, as @simianhacker pointed out. In this PR, I've removed `filterQuery` and renamed `fitlerQueryText` to `filterQuery` to avoid confusion and parsed the `filterQuery` when needed. After this change, you should only see `filterQuery` in the AAD and the rule definition with the user's value. |Rule definition|Alert document| |---|---| |![image](https://github.com/elastic/kibana/assets/12370520/05fb04c1-4f5a-4587-b7ac-a90a088b5f26)|![image](https://github.com/elastic/kibana/assets/12370520/2471d144-f284-4721-94ec-cf1b95029786)| ## 🧪 How to test - Create a new threshold rule and add a filter for it - Make sure that all the rule functionalities that use filter work as expected - Preview - Rule execution - Saved data in rule definition and alert document - Add an invalid filter query by editing the rule and make sure the validation works as expected (filter should be invalid state and save button should not work)
- Loading branch information
1 parent
d7e6f07
commit d0d3127
Showing
22 changed files
with
116 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...lic/components/threshold/components/__snapshots__/alert_details_app_section.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.