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

[Infra] Register Kibana locator to link to Infra's Asset Details and Inventory UIs #176667

Closed
4 of 6 tasks
crespocarlos opened this issue Feb 12, 2024 · 4 comments · Fixed by #191578
Closed
4 of 6 tasks
Assignees
Labels
Feature:ObsHosts Hosts feature within Observability Feature:ObsInventory good first issue low hanging fruit Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team technical debt Improvement of the software architecture and operational architecture

Comments

@crespocarlos
Copy link
Contributor

crespocarlos commented Feb 12, 2024

Summary

Kibana locators enable safe and consistent navigation between apps without hard-coding URLs. Infra should register locators for other Kibana apps to use.

AC

  • All current link-to routes can be expressed via locators.
  • All current link-to routes internally use locators.
  • All usages of link-to routes in other apps are replaced with usage of the appropriate locator.
  • The link-to routes are marked as deprecated.

Tasks

  1. 8.0 candidate Team:obs-ux-infra_services Team:obs-ux-management backport:skip ci:project-deploy-observability release_note:skip v8.16.0
    Bluefinger
  2. 8.0 candidate Team:obs-ux-infra_services Team:obs-ux-management backport:skip ci:project-deploy-observability release_note:skip v8.16.0
    Bluefinger
@crespocarlos crespocarlos added technical debt Improvement of the software architecture and operational architecture Feature:ObsHosts Hosts feature within Observability Feature:ObsInventory Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Feb 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@crespocarlos crespocarlos changed the title [Infra] Register Kibana locator to link to Infra's Asset Details and Inventory [Infra] Register Kibana locator to link to Infra's Asset Details and Inventory UIs Feb 12, 2024
@jennypavlova
Copy link
Member

cc @MiriamAparicio There is already this issue so you can ignore the comment here

@jennypavlova jennypavlova self-assigned this Apr 22, 2024
jennypavlova added a commit that referenced this issue May 13, 2024
…nventory uis (#181749)

Relates to #176667 

PR 1 of 3

## Summary

This PR replaces the asset details `link-to` component with the asset
details locator and the usage link-to inside infra with the asset
details locator

The other locators and other plugins changes will follow in separate PRs

## Testing: 
Check redirects to asset details (with different assets eg host, pod,
etc., and different links - open as page, hosts table, inventory flyout,
etc.)
On the button/link hover the link path should look similar to
`/app/r?l=ASSET_DETAILS_LOCATOR&v=8.15.0&lz={Long String}`:

- Metrics Explorer

<img width="1599" alt="image"
src="https://github.com/elastic/kibana/assets/14139027/ac54ad1c-9976-423c-8515-adb548b80edb">

- Hosts & Inventory



https://github.com/elastic/kibana/assets/14139027/65de04c0-d6da-457b-a24c-40e26c3d1b3d

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
jennypavlova added a commit that referenced this issue May 17, 2024
Relates to #176667 

## Summary

This PR adds an inventory locator and replaces the old redirect logic in
`RedirectToInventory`

## Testing

To simulate the usage of `link-to` use similar params to what alerts
link is using, for example:

`/app/metrics/link-to/inventory?customMetric=&metric=(type%3Acpu)&nodeType=pod&timestamp=1715703274459`
Compare the pages with the edge cluster to make sure that it looks the
same as before
@jennypavlova
Copy link
Member

Moving this to the backlog as I will focus on other issues/epics. I added a task list to track the issue and the first 2 are done.
cc: @crespocarlos @smith

@jennypavlova jennypavlova removed their assignment May 17, 2024
@smith smith added the good first issue low hanging fruit label Jul 10, 2024
@crespocarlos crespocarlos removed their assignment Aug 13, 2024
@crespocarlos
Copy link
Contributor Author

@Bluefinger, Let me know when you want to start looking into this. I believe most of the stuff concerning the metrics_app has been done. There seems to be some places where we still need to replace the link-to with locators.

Bluefinger added a commit that referenced this issue Sep 3, 2024
Relates to #176667 

## Summary

This PR adds the `MetricsExplorerLocator` and fixes some bugs that were
found regarding how locators were getting created and propagated.

## Testing

Alerts were created with group_by and no grouping to trigger for some
CPU usage. Going to the alert page and clicking the app view icon should
take you to the asset details page (if grouped) or to the metrics
explorer page (if no group) via the locators.

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
Co-authored-by: Bena Kansara <69037875+benakansara@users.noreply.github.com>
gergoabraham pushed a commit to gergoabraham/kibana that referenced this issue Sep 13, 2024
)

## Summary

Replacing `link-to` urls with infra locators, so that we can deprecate
`link-to` for infra.

### How to test

- Go to Infrastructure -> Inventory page.
- Choose either Hosts/Pods in the Show dropdown.
- Select List view instead of Default
- Click on an instance, select Metrics option on the popup

#### Expected Result

Should go to the assets detail page, for both Hosts (supported by new
assets details params) and Pods (not supported).

Closes elastic#176667

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ObsHosts Hosts feature within Observability Feature:ObsInventory good first issue low hanging fruit Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants