-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Custom threshold][Logs Explorer] Fix the issue with saving default prefilled filters in the custom threshold rule on the Logs Explorer page #183900
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@thomheymann I saw you were adding a functional test in this PR. Did you also work on adding a functional test to create a custom threshold rule with prefilled filters? If yes, was there an issue with adding it? Maybe I can help with fixing it since having such a test would be very useful. |
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
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.
@maryam-saeidi, when I select All logs
and then create a rule, I see no data in the rule creation form, while there is data in the Log Explorer. 🤔
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.
Is it intentional not to prefill the time range? e.g. the time range in the Log Explorer is 15 minutes, and when I create a rule, it's 1 minute
Yes, it is intentional, the logs explorer team didn't add such a logic. |
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.
I approve the PR to unblock you @maryam-saeidi, and leave it to you handle the issue I mentioned in this one or create a different one.
Thanks for creating a ticket for it. I saw it once, but when I ran my Kibana server again, I wasn't able to reproduce it. I also checked edge-lite, and it worked fine there. I'll go ahead and merge this PR, and we can check the other issue separately. |
💚 Build Succeeded
Metrics [docs]Async chunks
Canvas Sharable Runtime
History
To update your PR or re-run it, just comment with: |
…filters in the custom threshold rule on the Logs Explorer page (elastic#183900) Fixes elastic#183710 ## Summary This PR fixes the issue of saving prefilled filters in the custom threshold rule by using `getSearchConfiguration` every time the serachConfiguration is saved in rule parameters. Now, `getSearchConfiguration` does two things: 1. Ensure the query has the correct type (`Qurey`), or it will be set as the default query. 2. Adjust filters by removing `$state` and only keeping `meta` and `query` Also, I adjusted the related type to exclude `$state`. ### How to test https://github.com/elastic/kibana/assets/12370520/9d69e601-d021-4ae3-8baf-88286d3716fe (cherry picked from commit 4ccd47d)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…filled filters in the custom threshold rule on the Logs Explorer page (#183900) (#184087) # Backport This will backport the following commits from `main` to `8.14`: - [[Custom threshold][Logs Explorer] Fix an issue with saving prefilled filters in the custom threshold rule on the Logs Explorer page (#183900)](#183900) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maryam Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2024-05-23T07:16:07Z","message":"[Custom threshold][Logs Explorer] Fix an issue with saving prefilled filters in the custom threshold rule on the Logs Explorer page (#183900)\n\nFixes #183710\r\n\r\n## Summary\r\n\r\nThis PR fixes the issue of saving prefilled filters in the custom\r\nthreshold rule by using `getSearchConfiguration` every time the\r\nserachConfiguration is saved in rule parameters. Now,\r\n`getSearchConfiguration` does two things:\r\n1. Ensure the query has the correct type (`Qurey`), or it will be set as\r\nthe default query.\r\n2. Adjust filters by removing `$state` and only keeping `meta` and\r\n`query`\r\n\r\nAlso, I adjusted the related type to exclude `$state`.\r\n\r\n### How to test\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/12370520/9d69e601-d021-4ae3-8baf-88286d3716fe","sha":"4ccd47d90e7b812d0d405cdd906a8b775757c1a4","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management","v8.15.0"],"title":"[Custom threshold][Logs Explorer] Fix an issue with saving prefilled filters in the custom threshold rule on the Logs Explorer page","number":183900,"url":"#183900 threshold][Logs Explorer] Fix an issue with saving prefilled filters in the custom threshold rule on the Logs Explorer page (#183900)\n\nFixes #183710\r\n\r\n## Summary\r\n\r\nThis PR fixes the issue of saving prefilled filters in the custom\r\nthreshold rule by using `getSearchConfiguration` every time the\r\nserachConfiguration is saved in rule parameters. Now,\r\n`getSearchConfiguration` does two things:\r\n1. Ensure the query has the correct type (`Qurey`), or it will be set as\r\nthe default query.\r\n2. Adjust filters by removing `$state` and only keeping `meta` and\r\n`query`\r\n\r\nAlso, I adjusted the related type to exclude `$state`.\r\n\r\n### How to test\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/12370520/9d69e601-d021-4ae3-8baf-88286d3716fe","sha":"4ccd47d90e7b812d0d405cdd906a8b775757c1a4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"#183900 threshold][Logs Explorer] Fix an issue with saving prefilled filters in the custom threshold rule on the Logs Explorer page (#183900)\n\nFixes #183710\r\n\r\n## Summary\r\n\r\nThis PR fixes the issue of saving prefilled filters in the custom\r\nthreshold rule by using `getSearchConfiguration` every time the\r\nserachConfiguration is saved in rule parameters. Now,\r\n`getSearchConfiguration` does two things:\r\n1. Ensure the query has the correct type (`Qurey`), or it will be set as\r\nthe default query.\r\n2. Adjust filters by removing `$state` and only keeping `meta` and\r\n`query`\r\n\r\nAlso, I adjusted the related type to exclude `$state`.\r\n\r\n### How to test\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/12370520/9d69e601-d021-4ae3-8baf-88286d3716fe","sha":"4ccd47d90e7b812d0d405cdd906a8b775757c1a4"}}]}] BACKPORT--> Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
…filters in the custom threshold rule on the Logs Explorer page (elastic#183900) Fixes elastic#183710 ## Summary This PR fixes the issue of saving prefilled filters in the custom threshold rule by using `getSearchConfiguration` every time the serachConfiguration is saved in rule parameters. Now, `getSearchConfiguration` does two things: 1. Ensure the query has the correct type (`Qurey`), or it will be set as the default query. 2. Adjust filters by removing `$state` and only keeping `meta` and `query` Also, I adjusted the related type to exclude `$state`. ### How to test https://github.com/elastic/kibana/assets/12370520/9d69e601-d021-4ae3-8baf-88286d3716fe
Fixes #183710
Summary
This PR fixes the issue of saving prefilled filters in the custom threshold rule by using
getSearchConfiguration
every time the serachConfiguration is saved in rule parameters. Now,getSearchConfiguration
does two things:Qurey
), or it will be set as the default query.$state
and only keepingmeta
andquery
Also, I adjusted the related type to exclude
$state
.How to test
Screen.Recording.2024-05-22.at.18.mp4