Skip to content
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

[Infrastructure UI] Hosts View: Unified Search bar with auto-refresh enabled #156690

Closed
crespocarlos opened this issue May 4, 2023 · 9 comments · Fixed by #157011
Closed

[Infrastructure UI] Hosts View: Unified Search bar with auto-refresh enabled #156690

crespocarlos opened this issue May 4, 2023 · 9 comments · Fixed by #157011
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Metrics UI Metrics UI feature Feature:ObsHosts Hosts feature within Observability Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.8.0 v8.9.0
Milestone

Comments

@crespocarlos
Copy link
Contributor

crespocarlos commented May 4, 2023

Summary

On the unified search bar, the auto-refresh input is present, but the host view page doesn't support auto-refresh yet. It would be interesting to remove it to avoid confusion.

Image

Possible solution

We probably need have to pass isRefreshPaused prop to the SearchBar component

Acceptance Criteria

  • Auto-refresh option is disabled/removed from the date-picker
@crespocarlos crespocarlos added the Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services label May 4, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@crespocarlos crespocarlos added bug Fixes for quality problems that affect the customer experience Feature:ObsHosts Hosts feature within Observability v8.8.0 Feature:Metrics UI Metrics UI feature labels May 4, 2023
@jennypavlova jennypavlova self-assigned this May 4, 2023
@jennypavlova
Copy link
Member

With the current useDefaultBehaviors added when I add isRefreshPaused the refresh interval option is still available in the date picker - if we don't have useDefaultBehaviors and isRefreshPaused set to true the refresh interval is disabled but then the update is not working (without useDefaultBehaviors).
I will continue investigating and try to find a good way to disable it.

@crespocarlos
Copy link
Contributor Author

I don't know what happened, but I don't see it anymore.

@jennypavlova
Copy link
Member

I was talking about the option to add the autorefresh in the date picker (I also checked the eui custom options for the date picker):
image

Even if the user doesn't see it by default it's still possible to enable it there which is also confusing- isRefreshPaused will help us not show it if it's present but won't stop the user from adding it (it will still disappear after refresh in case it's added with this option):

Screen.Recording.2023-05-05.at.11.12.02.mov

I was searching for a way to disable/hide it from the date picker completely inside the Search bar but I don't see any option to do that ( I also tried to set showAutoRefreshOnly to false but this only controls if we should only show the auto-refresh not if the autorefresh is present or setting) Setting the refresh interval to 0 will also show the option in the date picker.

@jennypavlova
Copy link
Member

@crespocarlos Do you know who can we contact to ask about the unified search data picker options? I mean we can also just set isRefreshPaused and then if the user doesn't set the refresh interval from the date picker there won't be any issues but I think it's better to hide/disable the auto-refresh option completely from the date picker ( the only way to disable it I currently found is to remove useDefaultBehaviors and use isRefreshPaused but that won't work because we need useDefaultBehaviors) What do you think? I am also open to trying other things if you can think of something 🙂

@crespocarlos
Copy link
Contributor Author

@jennypavlova we could reach out to @elastic/kibana-visualizations. Apparently, we won't be able to solve this problem now.

@jennypavlova
Copy link
Member

@crespocarlos I am discussing that with them now, I will see what we can do to fix it.

@neptunian
Copy link
Contributor

How big of a task is enabling auto refresh? Wondering if its small, might be easier to just get it in.

@crespocarlos
Copy link
Contributor Author

crespocarlos commented May 15, 2023

I don't think it is as small as this task.

In theory, it is just about making the requests every X seconds.

Few things that come to mind:

  • With the date range filter defined as eg last 15m, we could just fetch the data considering the refresh rate but keeping the same window size - similar to what the Inventory UI does
  • With ranges defined with from as an absolute date eg 15-may 12:00, and to as relative date eg now, the window size would expand
  • Date ranges defined with only absolute dates doesn't make sense to enable auto refresh.

It may be best to understand how it can be done (if we want to enable auto refresh) and possible performance implications in a separate ticket.

jennypavlova added a commit that referenced this issue Jun 13, 2023
…enabled (#157011)

Closes #156690 

## Summary

This PR adds a flag (`isAutoRefreshDisabled`) to disable the default
auto-refresh option in the unified search.

## Background

The auto refresh is added by default when using a unified search bar in
[defaultOnRefreshChange](https://github.com/elastic/kibana/blob/main/src/plugins/unified_search/public/search_bar/create_search_bar.tsx/#L59)
and it appeared on the host view page when currently the auto-refresh
option is not supported.


| with `isAutoRefreshDisabled` (true) | without `isAutoRefreshDisabled`
(false/undefined) |
| ------------------------------------ |
-------------------------------------------------- |
| <img width="200" alt="image"
src="https://user-images.githubusercontent.com/14139027/236862888-63efdb13-6b07-41c2-abe8-88247c9c96e1.png">
| <img width="200" alt="image"
src="https://user-images.githubusercontent.com/14139027/236862409-4f36ec6a-f274-4dae-960b-407ea30f330b.png">
|

---------

Co-authored-by: Stratoula Kalafateli <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jun 13, 2023
…enabled (elastic#157011)

Closes elastic#156690

## Summary

This PR adds a flag (`isAutoRefreshDisabled`) to disable the default
auto-refresh option in the unified search.

## Background

The auto refresh is added by default when using a unified search bar in
[defaultOnRefreshChange](https://github.com/elastic/kibana/blob/main/src/plugins/unified_search/public/search_bar/create_search_bar.tsx/#L59)
and it appeared on the host view page when currently the auto-refresh
option is not supported.

| with `isAutoRefreshDisabled` (true) | without `isAutoRefreshDisabled`
(false/undefined) |
| ------------------------------------ |
-------------------------------------------------- |
| <img width="200" alt="image"
src="https://user-images.githubusercontent.com/14139027/236862888-63efdb13-6b07-41c2-abe8-88247c9c96e1.png">
| <img width="200" alt="image"
src="https://user-images.githubusercontent.com/14139027/236862409-4f36ec6a-f274-4dae-960b-407ea30f330b.png">
|

---------

Co-authored-by: Stratoula Kalafateli <[email protected]>
(cherry picked from commit 77d864e)
kibanamachine added a commit that referenced this issue Jun 13, 2023
…fresh enabled (#157011) (#159543)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Infrastructure UI] Hosts View: Unified Search bar with auto-refresh
enabled (#157011)](#157011)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT
[{"author":{"name":"jennypavlova","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-13T08:07:58Z","message":"[Infrastructure
UI] Hosts View: Unified Search bar with auto-refresh enabled
(#157011)\n\nCloses #156690 \r\n\r\n## Summary\r\n\r\nThis PR adds a
flag (`isAutoRefreshDisabled`) to disable the default\r\nauto-refresh
option in the unified search.\r\n\r\n## Background\r\n\r\nThe auto
refresh is added by default when using a unified search bar
in\r\n[defaultOnRefreshChange](https://github.com/elastic/kibana/blob/main/src/plugins/unified_search/public/search_bar/create_search_bar.tsx/#L59)\r\nand
it appeared on the host view page when currently the
auto-refresh\r\noption is not supported.\r\n\r\n\r\n| with
`isAutoRefreshDisabled` (true) | without
`isAutoRefreshDisabled`\r\n(false/undefined) |\r\n|
------------------------------------
|\r\n-------------------------------------------------- |\r\n| <img
width=\"200\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/14139027/236862888-63efdb13-6b07-41c2-abe8-88247c9c96e1.png\">\r\n|
<img width=\"200\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/14139027/236862409-4f36ec6a-f274-4dae-960b-407ea30f330b.png\">\r\n|\r\n\r\n---------\r\n\r\nCo-authored-by:
Stratoula Kalafateli
<[email protected]>","sha":"77d864e4ff04027f800789259fd6c6194b51c59a","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Infra
Monitoring
UI","release_note:skip","backport:prev-minor","v8.9.0"],"number":157011,"url":"https://github.com/elastic/kibana/pull/157011","mergeCommit":{"message":"[Infrastructure
UI] Hosts View: Unified Search bar with auto-refresh enabled
(#157011)\n\nCloses #156690 \r\n\r\n## Summary\r\n\r\nThis PR adds a
flag (`isAutoRefreshDisabled`) to disable the default\r\nauto-refresh
option in the unified search.\r\n\r\n## Background\r\n\r\nThe auto
refresh is added by default when using a unified search bar
in\r\n[defaultOnRefreshChange](https://github.com/elastic/kibana/blob/main/src/plugins/unified_search/public/search_bar/create_search_bar.tsx/#L59)\r\nand
it appeared on the host view page when currently the
auto-refresh\r\noption is not supported.\r\n\r\n\r\n| with
`isAutoRefreshDisabled` (true) | without
`isAutoRefreshDisabled`\r\n(false/undefined) |\r\n|
------------------------------------
|\r\n-------------------------------------------------- |\r\n| <img
width=\"200\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/14139027/236862888-63efdb13-6b07-41c2-abe8-88247c9c96e1.png\">\r\n|
<img width=\"200\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/14139027/236862409-4f36ec6a-f274-4dae-960b-407ea30f330b.png\">\r\n|\r\n\r\n---------\r\n\r\nCo-authored-by:
Stratoula Kalafateli
<[email protected]>","sha":"77d864e4ff04027f800789259fd6c6194b51c59a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157011","number":157011,"mergeCommit":{"message":"[Infrastructure
UI] Hosts View: Unified Search bar with auto-refresh enabled
(#157011)\n\nCloses #156690 \r\n\r\n## Summary\r\n\r\nThis PR adds a
flag (`isAutoRefreshDisabled`) to disable the default\r\nauto-refresh
option in the unified search.\r\n\r\n## Background\r\n\r\nThe auto
refresh is added by default when using a unified search bar
in\r\n[defaultOnRefreshChange](https://github.com/elastic/kibana/blob/main/src/plugins/unified_search/public/search_bar/create_search_bar.tsx/#L59)\r\nand
it appeared on the host view page when currently the
auto-refresh\r\noption is not supported.\r\n\r\n\r\n| with
`isAutoRefreshDisabled` (true) | without
`isAutoRefreshDisabled`\r\n(false/undefined) |\r\n|
------------------------------------
|\r\n-------------------------------------------------- |\r\n| <img
width=\"200\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/14139027/236862888-63efdb13-6b07-41c2-abe8-88247c9c96e1.png\">\r\n|
<img width=\"200\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/14139027/236862409-4f36ec6a-f274-4dae-960b-407ea30f330b.png\">\r\n|\r\n\r\n---------\r\n\r\nCo-authored-by:
Stratoula Kalafateli
<[email protected]>","sha":"77d864e4ff04027f800789259fd6c6194b51c59a"}}]}]
BACKPORT-->

Co-authored-by: jennypavlova <[email protected]>
@roshan-elastic roshan-elastic added this to the 8.9 milestone Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Metrics UI Metrics UI feature Feature:ObsHosts Hosts feature within Observability Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants