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] add URL state to Hosts View #141492

Closed
neptunian opened this issue Sep 22, 2022 · 1 comment · Fixed by #144181
Closed

[Infrastructure UI] add URL state to Hosts View #141492

neptunian opened this issue Sep 22, 2022 · 1 comment · Fixed by #144181
Assignees
Labels
Epic: Host Observability Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@neptunian
Copy link
Contributor

neptunian commented Sep 22, 2022

Like the other Infra Views the Host View should have a url state that updates the browser's URL so that it can be linked to. For eg, user filters down via the search bar, user adds some filters (after #139594 is implemented), URL updates, user copies and pastes link to someone so they can see the same view. See the Inventory View as another example.

Use the existing useUrlState hook being used in other Infra views.

This can be worked on before implementation of controls and filters if those are not implemented when this is picked up and a follow up issue can be opened to address those as they are added.

Acceptance Criteria

@neptunian neptunian added Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Epic: Host Observability labels Sep 22, 2022
@elasticmachine
Copy link
Contributor

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

@neptunian neptunian changed the title [Infra UI] add URL state to Hosts View [Infrastructure UI] add URL state to Hosts View Sep 22, 2022
@jennypavlova jennypavlova self-assigned this Oct 20, 2022
@smith smith added ci:cloud-deploy Create or update a Cloud deployment and removed ci:cloud-deploy Create or update a Cloud deployment labels Nov 2, 2022
@neptunian neptunian reopened this Nov 14, 2022
jennypavlova added a commit that referenced this issue Nov 14, 2022
Closes  [#141492](#141492)
## Summary
This PR adds `query`, `timeRange` and `filters` parameters to the URL
state on the hosts view. URL parameters are updated after search filters
are applied (after click on the "update" button.

## Testing
Different cases:
- Add new search criteria ( filter / time range / query ) and click on
"update" - the URL should update
- Save a query and reload
- Load a saved query 
- Change an existing query


![image](https://user-images.githubusercontent.com/14139027/199047590-29e375fb-6909-424b-89c4-ef9193a77b10.png)


![image](https://user-images.githubusercontent.com/14139027/199046342-29fbfa76-0314-462b-b593-2c535112be09.png)


![image](https://user-images.githubusercontent.com/14139027/199046201-76ace0fa-8d17-4e1f-b36f-54a2419fb6af.png)

- Open the URL in a new browser tab/window - the filters should be added

Co-authored-by: Carlos Crespo <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Nathan L Smith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic: Host Observability Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
4 participants