[Security Solution] Fix incorrect default value for History Window Size#207827
[Security Solution] Fix incorrect default value for History Window Size#207827nikitaindik merged 3 commits intoelastic:mainfrom
Conversation
5ef4d3b to
b7e662c
Compare
|
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
|
Also, I found a seemingly unused |
vitaliidm
left a comment
There was a problem hiding this comment.
Looks good!
Can we add a unit test that ensures days displayed correctly? And we good to merge
b7e662c to
0726fe4
Compare
|
Thanks for review, @vitaliidm! I've added the test. |
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12949047912 |
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @nikitaindik |
…ze (elastic#207827) **Resolves: elastic#207348 ## Summary This PR resolves a bug in the editable History Window Size component, which incorrectly displays "0 seconds" as the default value instead of "7 days". The issue was caused by passing an array of units `(['m', 'h', 'd'])` using an incorrect prop name. Also, I fixed stuck last digit being stuck when trying to remove it **Before my changes: can't remove or reset the last digit** https://github.com/user-attachments/assets/3a7d28ea-ea71-4ee8-8805-902bae1dc3c1 **After my changes: value resets to minValue on last digit removal** https://github.com/user-attachments/assets/1cba36bb-9127-4197-871e-62b978b3612c Work started on: 22-Jan-2025 (cherry picked from commit 8894c1f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…dow Size (#207827) (#208178) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Fix incorrect default value for History Window Size (#207827)](#207827) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2025-01-24T11:49:42Z","message":"[Security Solution] Fix incorrect default value for History Window Size (#207827)\n\n**Resolves: https://github.com/elastic/kibana/issues/207348**\n\n## Summary\nThis PR resolves a bug in the editable History Window Size component,\nwhich incorrectly displays \"0 seconds\" as the default value instead of\n\"7 days\". The issue was caused by passing an array of units `(['m', 'h',\n'd'])` using an incorrect prop name.\n\nAlso, I fixed stuck last digit being stuck when trying to remove it\n**Before my changes: can't remove or reset the last digit**\n\n\nhttps://github.com/user-attachments/assets/3a7d28ea-ea71-4ee8-8805-902bae1dc3c1\n\n**After my changes: value resets to minValue on last digit removal**\n\n\nhttps://github.com/user-attachments/assets/1cba36bb-9127-4197-871e-62b978b3612c\n\n\nWork started on: 22-Jan-2025","sha":"8894c1f395ce5d30c750db9d5b6c9be4fecac6f7","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Rule Creation","Feature:Rule Edit","backport:version","v8.18.0"],"title":"[Security Solution] Fix incorrect default value for History Window Size","number":207827,"url":"https://github.com/elastic/kibana/pull/207827","mergeCommit":{"message":"[Security Solution] Fix incorrect default value for History Window Size (#207827)\n\n**Resolves: https://github.com/elastic/kibana/issues/207348**\n\n## Summary\nThis PR resolves a bug in the editable History Window Size component,\nwhich incorrectly displays \"0 seconds\" as the default value instead of\n\"7 days\". The issue was caused by passing an array of units `(['m', 'h',\n'd'])` using an incorrect prop name.\n\nAlso, I fixed stuck last digit being stuck when trying to remove it\n**Before my changes: can't remove or reset the last digit**\n\n\nhttps://github.com/user-attachments/assets/3a7d28ea-ea71-4ee8-8805-902bae1dc3c1\n\n**After my changes: value resets to minValue on last digit removal**\n\n\nhttps://github.com/user-attachments/assets/1cba36bb-9127-4197-871e-62b978b3612c\n\n\nWork started on: 22-Jan-2025","sha":"8894c1f395ce5d30c750db9d5b6c9be4fecac6f7"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207827","number":207827,"mergeCommit":{"message":"[Security Solution] Fix incorrect default value for History Window Size (#207827)\n\n**Resolves: https://github.com/elastic/kibana/issues/207348**\n\n## Summary\nThis PR resolves a bug in the editable History Window Size component,\nwhich incorrectly displays \"0 seconds\" as the default value instead of\n\"7 days\". The issue was caused by passing an array of units `(['m', 'h',\n'd'])` using an incorrect prop name.\n\nAlso, I fixed stuck last digit being stuck when trying to remove it\n**Before my changes: can't remove or reset the last digit**\n\n\nhttps://github.com/user-attachments/assets/3a7d28ea-ea71-4ee8-8805-902bae1dc3c1\n\n**After my changes: value resets to minValue on last digit removal**\n\n\nhttps://github.com/user-attachments/assets/1cba36bb-9127-4197-871e-62b978b3612c\n\n\nWork started on: 22-Jan-2025","sha":"8894c1f395ce5d30c750db9d5b6c9be4fecac6f7"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
…ze (elastic#207827) **Resolves: elastic#207348 ## Summary This PR resolves a bug in the editable History Window Size component, which incorrectly displays "0 seconds" as the default value instead of "7 days". The issue was caused by passing an array of units `(['m', 'h', 'd'])` using an incorrect prop name. Also, I fixed stuck last digit being stuck when trying to remove it **Before my changes: can't remove or reset the last digit** https://github.com/user-attachments/assets/3a7d28ea-ea71-4ee8-8805-902bae1dc3c1 **After my changes: value resets to minValue on last digit removal** https://github.com/user-attachments/assets/1cba36bb-9127-4197-871e-62b978b3612c Work started on: 22-Jan-2025
Resolves: #207348
Summary
This PR resolves a bug in the editable History Window Size component, which incorrectly displays "0 seconds" as the default value instead of "7 days". The issue was caused by passing an array of units
(['m', 'h', 'd'])using an incorrect prop name.Also, I fixed stuck last digit being stuck when trying to remove it
Before my changes: can't remove or reset the last digit
Schermopname.2025-01-23.om.16.21.24.mov
After my changes: value resets to minValue on last digit removal
Schermopname.2025-01-23.om.16.19.14.mov
Work started on: 22-Jan-2025