[8.17] [Infra][Hosts] Reset SearchBar refresh state to fully disable auto-refresh (#205416) (#205505)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Infra][Hosts] Reset SearchBar refresh state to fully disable
auto-refresh (#205416)](https://github.com/elastic/kibana/pull/205416)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gonçalo Rica Pais da
Silva","email":"goncalo.rica@elastic.co"},"sourceCommit":{"committedDate":"2025-01-03T15:04:17Z","message":"[Infra][Hosts]
Reset SearchBar refresh state to fully disable auto-refresh
(#205416)\n\n## Summary\r\n\r\nA bug with the search bar configuration
allows for a page that does not\r\nhave auto-refresh enabled to inherit
the auto-refresh state from another\r\npage that had previously enabled
it. This PR fixes that by fully\r\nresetting the state for the page's
search bar to ensure auto-refresh is\r\nnot active for Hosts page (as it
should be).\r\n\r\nCloses #205414 \r\n\r\n## How to test\r\n\r\n- Go to
Alerts page\r\n- Click on the Date Quick Selector, enable the
auto-refresh feature.\r\nConfirm the refresh icon is on the datepicker
now.\r\n- Navigate to Hosts page\r\n- The auto-refresh icon on the Hosts
page search bar datepicker should\r\nno longer be visible, and opening
the date quick selector should not\r\nshow any auto-refresh
feature/toggle.","sha":"d25dcc11ebdd18324111fc7dc403014b08fbf786","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major","Team:obs-ux-infra_services","v8.16.3","v8.17.1"],"title":"[Infra][Hosts]
Reset SearchBar refresh state to fully disable
auto-refresh","number":205416,"url":"https://github.com/elastic/kibana/pull/205416","mergeCommit":{"message":"[Infra][Hosts]
Reset SearchBar refresh state to fully disable auto-refresh
(#205416)\n\n## Summary\r\n\r\nA bug with the search bar configuration
allows for a page that does not\r\nhave auto-refresh enabled to inherit
the auto-refresh state from another\r\npage that had previously enabled
it. This PR fixes that by fully\r\nresetting the state for the page's
search bar to ensure auto-refresh is\r\nnot active for Hosts page (as it
should be).\r\n\r\nCloses #205414 \r\n\r\n## How to test\r\n\r\n- Go to
Alerts page\r\n- Click on the Date Quick Selector, enable the
auto-refresh feature.\r\nConfirm the refresh icon is on the datepicker
now.\r\n- Navigate to Hosts page\r\n- The auto-refresh icon on the Hosts
page search bar datepicker should\r\nno longer be visible, and opening
the date quick selector should not\r\nshow any auto-refresh
feature/toggle.","sha":"d25dcc11ebdd18324111fc7dc403014b08fbf786"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205416","number":205416,"mergeCommit":{"message":"[Infra][Hosts]
Reset SearchBar refresh state to fully disable auto-refresh
(#205416)\n\n## Summary\r\n\r\nA bug with the search bar configuration
allows for a page that does not\r\nhave auto-refresh enabled to inherit
the auto-refresh state from another\r\npage that had previously enabled
it. This PR fixes that by fully\r\nresetting the state for the page's
search bar to ensure auto-refresh is\r\nnot active for Hosts page (as it
should be).\r\n\r\nCloses #205414 \r\n\r\n## How to test\r\n\r\n- Go to
Alerts page\r\n- Click on the Date Quick Selector, enable the
auto-refresh feature.\r\nConfirm the refresh icon is on the datepicker
now.\r\n- Navigate to Hosts page\r\n- The auto-refresh icon on the Hosts
page search bar datepicker should\r\nno longer be visible, and opening
the date quick selector should not\r\nshow any auto-refresh
feature/toggle.","sha":"d25dcc11ebdd18324111fc7dc403014b08fbf786"}},{"branch":"8.16","label":"v8.16.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Gonçalo Rica Pais da Silva <goncalo.rica@elastic.co>
This commit is contained in:
Kibana Machine 2025-01-04 03:50:14 +11:00 committed by GitHub
parent 45d8ba824f
commit 846f433f4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,6 +60,7 @@ export const UnifiedSearchBar = () => {
showQueryMenu
useDefaultBehaviors
isAutoRefreshDisabled
isRefreshPaused
/>
</EuiFlexItem>
<EuiFlexItem>